mongrel_esi 0.5.1 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (179) hide show
  1. data/README +10 -9
  2. data/doc/rdoc/classes/ESI/Cache.html +10 -10
  3. data/doc/rdoc/classes/ESI/Cache.src/{M000085.html → M000087.html} +0 -0
  4. data/doc/rdoc/classes/ESI/Cache.src/{M000086.html → M000088.html} +0 -0
  5. data/doc/rdoc/classes/ESI/Config.html +43 -62
  6. data/doc/rdoc/classes/ESI/Config.src/M000049.html +18 -0
  7. data/doc/rdoc/classes/ESI/Config.src/{M000059.html → M000050.html} +5 -5
  8. data/doc/rdoc/classes/ESI/Config.src/M000051.html +35 -0
  9. data/doc/rdoc/classes/ESI/Config.src/M000052.html +27 -5
  10. data/doc/rdoc/classes/ESI/Config.src/M000053.html +10 -5
  11. data/doc/rdoc/classes/ESI/Config.src/M000054.html +5 -22
  12. data/doc/rdoc/classes/ESI/Config.src/M000055.html +7 -25
  13. data/doc/rdoc/classes/ESI/Config.src/M000056.html +11 -10
  14. data/doc/rdoc/classes/ESI/Config/CacheConfig.html +25 -25
  15. data/doc/rdoc/classes/ESI/Config/CacheConfig.src/{M000068.html → M000060.html} +6 -5
  16. data/doc/rdoc/classes/ESI/Config/CacheConfig.src/{M000065.html → M000061.html} +5 -5
  17. data/doc/rdoc/classes/ESI/Config/CacheConfig.src/{M000066.html → M000062.html} +4 -4
  18. data/doc/rdoc/classes/ESI/Config/CacheConfig.src/{M000067.html → M000063.html} +4 -4
  19. data/doc/rdoc/classes/ESI/Config/CacheConfig.src/M000064.html +5 -6
  20. data/doc/rdoc/classes/ESI/Config/ConfigRouter.html +15 -15
  21. data/doc/rdoc/classes/ESI/Config/ConfigRouter.src/{M000061.html → M000057.html} +5 -5
  22. data/doc/rdoc/classes/ESI/Config/ConfigRouter.src/{M000062.html → M000058.html} +7 -7
  23. data/doc/rdoc/classes/ESI/Config/ConfigRouter.src/{M000063.html → M000059.html} +7 -7
  24. data/doc/rdoc/classes/ESI/Dispatcher.html +17 -15
  25. data/doc/rdoc/classes/ESI/Dispatcher.src/{M000087.html → M000092.html} +4 -7
  26. data/doc/rdoc/classes/ESI/Dispatcher.src/M000093.html +27 -0
  27. data/doc/rdoc/classes/ESI/Fragment.html +15 -15
  28. data/doc/rdoc/classes/ESI/Fragment.src/{M000100.html → M000111.html} +0 -0
  29. data/doc/rdoc/classes/ESI/Fragment.src/{M000101.html → M000112.html} +0 -0
  30. data/doc/rdoc/classes/ESI/Fragment.src/{M000102.html → M000113.html} +0 -0
  31. data/doc/rdoc/classes/ESI/MemcachedCache.html +46 -46
  32. data/doc/rdoc/classes/ESI/MemcachedCache.src/M000037.html +24 -0
  33. data/doc/rdoc/classes/ESI/MemcachedCache.src/M000038.html +22 -0
  34. data/doc/rdoc/classes/ESI/MemcachedCache.src/M000039.html +19 -0
  35. data/doc/rdoc/classes/ESI/MemcachedCache.src/M000040.html +10 -11
  36. data/doc/rdoc/classes/ESI/MemcachedCache.src/M000041.html +5 -9
  37. data/doc/rdoc/classes/ESI/MemcachedCache.src/M000042.html +6 -6
  38. data/doc/rdoc/classes/ESI/MemcachedCache.src/M000043.html +5 -10
  39. data/doc/rdoc/classes/ESI/MemcachedCache.src/M000044.html +5 -5
  40. data/doc/rdoc/classes/ESI/MemcachedCache.src/M000045.html +4 -6
  41. data/doc/rdoc/classes/ESI/OutputAdapter.html +204 -0
  42. data/doc/rdoc/classes/ESI/OutputAdapter.src/M000094.html +37 -0
  43. data/doc/rdoc/classes/ESI/OutputAdapter.src/M000095.html +18 -0
  44. data/doc/rdoc/classes/ESI/OutputAdapter.src/M000096.html +18 -0
  45. data/doc/rdoc/classes/ESI/OutputAdapter.src/M000097.html +18 -0
  46. data/doc/rdoc/classes/ESI/Parser.html +15 -15
  47. data/doc/rdoc/classes/ESI/Parser.src/{M000049.html → M000065.html} +0 -0
  48. data/doc/rdoc/classes/ESI/Parser.src/{M000050.html → M000066.html} +0 -0
  49. data/doc/rdoc/classes/ESI/Parser.src/{M000051.html → M000067.html} +0 -0
  50. data/doc/rdoc/classes/ESI/Processor.html +15 -15
  51. data/doc/rdoc/classes/ESI/Processor.src/{M000037.html → M000046.html} +0 -0
  52. data/doc/rdoc/classes/ESI/Processor.src/{M000038.html → M000047.html} +1 -1
  53. data/doc/rdoc/classes/ESI/Processor.src/{M000039.html → M000048.html} +0 -0
  54. data/doc/rdoc/classes/ESI/Proxy.html +48 -48
  55. data/doc/rdoc/classes/ESI/Proxy.src/M000071.html +7 -40
  56. data/doc/rdoc/classes/ESI/Proxy.src/M000072.html +50 -12
  57. data/doc/rdoc/classes/ESI/Proxy.src/M000073.html +49 -6
  58. data/doc/rdoc/classes/ESI/Proxy.src/M000074.html +11 -14
  59. data/doc/rdoc/classes/ESI/Proxy.src/M000075.html +6 -5
  60. data/doc/rdoc/classes/ESI/Proxy.src/M000076.html +9 -15
  61. data/doc/rdoc/classes/ESI/Proxy.src/M000077.html +5 -16
  62. data/doc/rdoc/classes/ESI/Proxy.src/M000078.html +28 -0
  63. data/doc/rdoc/classes/ESI/Proxy.src/M000079.html +29 -0
  64. data/doc/rdoc/classes/ESI/RackAdapter.html +214 -0
  65. data/doc/rdoc/classes/ESI/RackAdapter.src/M000068.html +18 -0
  66. data/doc/rdoc/classes/ESI/RackAdapter.src/M000069.html +34 -0
  67. data/doc/rdoc/classes/ESI/{MemcachedCache.src/M000048.html → RackAdapter.src/M000070.html} +4 -4
  68. data/doc/rdoc/classes/ESI/RackConfig.html +173 -0
  69. data/doc/rdoc/classes/ESI/RackConfig.src/M000089.html +28 -0
  70. data/doc/rdoc/classes/ESI/RackConfig.src/M000090.html +18 -0
  71. data/doc/rdoc/classes/ESI/RackConfig.src/M000091.html +20 -0
  72. data/doc/rdoc/classes/ESI/Request.html +158 -0
  73. data/doc/rdoc/classes/ESI/{MemcachedCache.src/M000046.html → Request.src/M000098.html} +5 -5
  74. data/doc/rdoc/classes/ESI/Request.src/M000099.html +18 -0
  75. data/doc/rdoc/classes/ESI/Response.html +36 -36
  76. data/doc/rdoc/classes/ESI/Response.src/M000080.html +10 -8
  77. data/doc/rdoc/classes/ESI/Response.src/M000081.html +5 -7
  78. data/doc/rdoc/classes/ESI/Response.src/M000082.html +8 -12
  79. data/doc/rdoc/classes/ESI/Response.src/M000083.html +7 -5
  80. data/doc/rdoc/classes/ESI/Response.src/M000084.html +12 -20
  81. data/doc/rdoc/classes/ESI/Response.src/{M000079.html → M000085.html} +5 -5
  82. data/doc/rdoc/classes/ESI/Response.src/M000086.html +33 -0
  83. data/doc/rdoc/classes/ESI/Router.html +10 -10
  84. data/doc/rdoc/classes/ESI/Router.src/{M000098.html → M000109.html} +0 -0
  85. data/doc/rdoc/classes/ESI/Router.src/{M000099.html → M000110.html} +0 -0
  86. data/doc/rdoc/classes/ESI/RubyCache.html +45 -45
  87. data/doc/rdoc/classes/ESI/RubyCache.src/{M000089.html → M000100.html} +6 -6
  88. data/doc/rdoc/classes/ESI/RubyCache.src/{M000090.html → M000101.html} +6 -6
  89. data/doc/rdoc/classes/ESI/RubyCache.src/{M000091.html → M000102.html} +6 -6
  90. data/doc/rdoc/classes/ESI/RubyCache.src/{M000092.html → M000103.html} +8 -8
  91. data/doc/rdoc/classes/ESI/RubyCache.src/{M000093.html → M000104.html} +4 -4
  92. data/doc/rdoc/classes/ESI/RubyCache.src/{M000094.html → M000105.html} +8 -8
  93. data/doc/rdoc/classes/ESI/RubyCache.src/{M000095.html → M000106.html} +4 -4
  94. data/doc/rdoc/classes/ESI/RubyCache.src/{M000096.html → M000107.html} +4 -4
  95. data/doc/rdoc/classes/ESI/RubyCache.src/{M000097.html → M000108.html} +4 -4
  96. data/doc/rdoc/classes/ESI/Tag.html +8 -8
  97. data/doc/rdoc/created.rid +1 -1
  98. data/doc/rdoc/files/COPYING.html +1 -1
  99. data/doc/rdoc/files/LICENSE.html +1 -1
  100. data/doc/rdoc/files/README.html +12 -10
  101. data/doc/rdoc/files/ext/esi/common_rl.html +1 -1
  102. data/doc/rdoc/files/ext/esi/esi_parser_c.html +1 -1
  103. data/doc/rdoc/files/ext/esi/parser_c.html +1 -1
  104. data/doc/rdoc/files/ext/esi/parser_h.html +1 -1
  105. data/doc/rdoc/files/ext/esi/parser_rl.html +122 -82
  106. data/doc/rdoc/files/ext/esi/test/test_c.html +1 -1
  107. data/doc/rdoc/files/lib/esi/cache_rb.html +2 -1
  108. data/doc/rdoc/files/lib/esi/config_rb.html +2 -1
  109. data/doc/rdoc/files/lib/esi/dispatcher_rb.html +3 -1
  110. data/doc/rdoc/files/lib/esi/invalidator_rb.html +1 -1
  111. data/doc/rdoc/files/lib/esi/logger_rb.html +1 -1
  112. data/doc/rdoc/files/lib/esi/parser_rb.html +1 -1
  113. data/doc/rdoc/files/lib/esi/processor_rb.html +1 -1
  114. data/doc/rdoc/files/lib/esi/proxy_rb.html +2 -2
  115. data/doc/rdoc/files/{ext/esi/test/parser_c.html → lib/esi/rack_adapter_rb.html} +21 -5
  116. data/doc/rdoc/files/lib/esi/response_rb.html +1 -1
  117. data/doc/rdoc/files/lib/esi/router_rb.html +1 -1
  118. data/doc/rdoc/files/lib/esi/tag/attempt_rb.html +1 -1
  119. data/doc/rdoc/files/lib/esi/tag/base_rb.html +1 -1
  120. data/doc/rdoc/files/lib/esi/tag/container_rb.html +1 -1
  121. data/doc/rdoc/files/lib/esi/tag/except_rb.html +1 -1
  122. data/doc/rdoc/files/lib/esi/tag/include_rb.html +1 -1
  123. data/doc/rdoc/files/lib/esi/tag/invalidate_rb.html +1 -1
  124. data/doc/rdoc/files/lib/esi/tag/try_rb.html +1 -1
  125. data/doc/rdoc/files/lib/esi/version_rb.html +1 -1
  126. data/doc/rdoc/files/lib/multi_dirhandler_rb.html +1 -1
  127. data/doc/rdoc/fr_class_index.html +4 -0
  128. data/doc/rdoc/fr_file_index.html +1 -5
  129. data/doc/rdoc/fr_method_index.html +87 -76
  130. data/ext/esi/esi_parser.c +2 -2
  131. data/ext/esi/parser.c +133 -107
  132. data/ext/esi/parser.h +9 -4
  133. data/ext/esi/parser.rl +99 -73
  134. data/ext/esi/test/test.c +11 -6
  135. data/lib/esi/cache.rb +7 -3
  136. data/lib/esi/config.rb +4 -8
  137. data/lib/esi/dispatcher.rb +14 -5
  138. data/lib/esi/processor.rb +1 -1
  139. data/lib/esi/proxy.rb +58 -48
  140. data/lib/esi/rack_adapter.rb +97 -0
  141. data/lib/esi/response.rb +30 -1
  142. data/lib/esi/version.rb +1 -1
  143. data/test/bench-plot.rb +31 -0
  144. data/test/benchmarks/csv-perf-serial0.4 +101 -0
  145. data/test/benchmarks/csv-perf-trunk +101 -0
  146. data/test/benchmarks/perf-serial0.4-n1000-c1.csv +101 -0
  147. data/test/benchmarks/perf-serial0.4-n1000-c2.csv +101 -0
  148. data/test/benchmarks/perf-serial0.4-n1000-c3.csv +101 -0
  149. data/test/benchmarks/perf-serial0.4-n1000-c4.csv +101 -0
  150. data/test/benchmarks/perf-serial0.4-n1000-c5.csv +101 -0
  151. data/test/benchmarks/perf-serial0.4-n1000-c6.csv +101 -0
  152. data/test/benchmarks/perf-serial0.4-n1000-c7.csv +101 -0
  153. data/test/benchmarks/perf-trunk-n1000-c1.csv +101 -0
  154. data/test/benchmarks/perf-trunk-n1000-c2.csv +101 -0
  155. data/test/benchmarks/perf-trunk-n1000-c3.csv +101 -0
  156. data/test/benchmarks/perf-trunk-n1000-c4.csv +101 -0
  157. data/test/benchmarks/perf-trunk-n1000-c5.csv +101 -0
  158. data/test/benchmarks/perf-trunk-n1000-c6.csv +101 -0
  159. data/test/benchmarks/perf-trunk-n1000-c7.csv +101 -0
  160. data/test/load_test.rb +5 -2
  161. data/test/load_test_ab.rb +9 -4
  162. metadata +261 -227
  163. data/doc/rdoc/classes/ESI/Config.src/M000057.html +0 -18
  164. data/doc/rdoc/classes/ESI/Config.src/M000058.html +0 -20
  165. data/doc/rdoc/classes/ESI/Config.src/M000060.html +0 -24
  166. data/doc/rdoc/classes/ESI/Dispatcher.src/M000088.html +0 -18
  167. data/doc/rdoc/classes/ESI/MemcachedCache.src/M000047.html +0 -18
  168. data/doc/rdoc/classes/ESI/Proxy.src/M000069.html +0 -20
  169. data/doc/rdoc/classes/ESI/Proxy.src/M000070.html +0 -55
  170. data/doc/rdoc/classes/ESI/Response.src/M000078.html +0 -23
  171. data/doc/rdoc/files/ext/esi/test/common_rl.html +0 -160
  172. data/doc/rdoc/files/ext/esi/test/parser_h.html +0 -101
  173. data/doc/rdoc/files/ext/esi/test/parser_rl.html +0 -827
  174. data/doc/rdoc/files/ext/esi/test/sp_c.html +0 -101
  175. data/ext/esi/test/common.rl +0 -46
  176. data/ext/esi/test/parser.c +0 -1875
  177. data/ext/esi/test/parser.h +0 -120
  178. data/ext/esi/test/parser.rl +0 -585
  179. data/ext/esi/test/sp.c +0 -125
@@ -10,13 +10,10 @@
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/esi/dispatcher.rb, line 10</span>
14
- 10: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>( <span class="ruby-identifier">options</span> )
15
- 11: <span class="ruby-keyword kw">super</span>()
16
- 12: <span class="ruby-ivar">@config</span> = <span class="ruby-constant">ESI</span><span class="ruby-operator">::</span><span class="ruby-constant">Config</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">options</span> )
17
- 13: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@config</span>.<span class="ruby-identifier">start_invalidator?</span>
18
- 14: <span class="ruby-constant">ESI</span><span class="ruby-operator">::</span><span class="ruby-constant">Invalidator</span>.<span class="ruby-identifier">start</span>( <span class="ruby-keyword kw">self</span> )
19
- 15: <span class="ruby-keyword kw">end</span>
13
+ <pre> <span class="ruby-comment cmt"># File lib/esi/dispatcher.rb, line 13</span>
14
+ 13: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>( <span class="ruby-identifier">options</span> )
15
+ 14: <span class="ruby-keyword kw">super</span>()
16
+ 15: <span class="ruby-ivar">@config</span> = <span class="ruby-constant">ESI</span><span class="ruby-operator">::</span><span class="ruby-constant">Config</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">options</span> )
20
17
  16: <span class="ruby-keyword kw">end</span></pre>
21
18
  </body>
22
19
  </html>
@@ -0,0 +1,27 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>process (ESI::Dispatcher)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre> <span class="ruby-comment cmt"># File lib/esi/dispatcher.rb, line 18</span>
14
+ 18: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">process</span>(<span class="ruby-identifier">request</span>, <span class="ruby-identifier">response</span>)
15
+ 19: <span class="ruby-identifier">start</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>
16
+ 20:
17
+ 21: <span class="ruby-identifier">url</span> = <span class="ruby-ivar">@config</span>.<span class="ruby-identifier">router</span>.<span class="ruby-identifier">url_for</span>(<span class="ruby-identifier">request</span>.<span class="ruby-identifier">params</span>[<span class="ruby-value str">&quot;REQUEST_URI&quot;</span>])
18
+ 22:
19
+ 23: <span class="ruby-identifier">chunk_count</span>, <span class="ruby-identifier">bytes_sent</span>, <span class="ruby-identifier">status</span>, <span class="ruby-identifier">sent_from_cache</span> = <span class="ruby-constant">ESI</span><span class="ruby-operator">::</span><span class="ruby-constant">Proxy</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@config</span>).<span class="ruby-identifier">process</span>(<span class="ruby-identifier">url</span>, <span class="ruby-identifier">request</span>,<span class="ruby-identifier">response</span>)
20
+ 24:
21
+ 25: <span class="ruby-keyword kw">rescue</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
22
+ 26: <span class="ruby-identifier">log_error</span> <span class="ruby-node">&quot;\n#{e.message}: error at #{e.backtrace.first} msg at #{__FILE__}:#{__LINE__}\n&quot;</span>
23
+ 27: <span class="ruby-keyword kw">ensure</span>
24
+ 28: <span class="ruby-identifier">log_request</span> <span class="ruby-node">&quot;\n#{url}, #{Time.now - start} seconds with status #{status} #{sent_from_cache ? &quot;from cache&quot; : ''} and #{chunk_count} chunks, #{bytes_sent} bytes\n&quot;</span>
25
+ 29: <span class="ruby-keyword kw">end</span></pre>
26
+ </body>
27
+ </html>
@@ -92,9 +92,9 @@ Represents part of the cached page, typically an &lt;esi:include
92
92
  <h3 class="section-bar">Methods</h3>
93
93
 
94
94
  <div class="name-list">
95
- <a href="#M000101">dup</a>&nbsp;&nbsp;
96
- <a href="#M000100">new</a>&nbsp;&nbsp;
97
- <a href="#M000102">valid?</a>&nbsp;&nbsp;
95
+ <a href="#M000112">dup</a>&nbsp;&nbsp;
96
+ <a href="#M000111">new</a>&nbsp;&nbsp;
97
+ <a href="#M000113">valid?</a>&nbsp;&nbsp;
98
98
  </div>
99
99
  </div>
100
100
 
@@ -152,12 +152,12 @@ Represents part of the cached page, typically an &lt;esi:include
152
152
  <div id="methods">
153
153
  <h3 class="section-bar">Public Class methods</h3>
154
154
 
155
- <div id="method-M000100" class="method-detail">
156
- <a name="M000100"></a>
155
+ <div id="method-M000111" class="method-detail">
156
+ <a name="M000111"></a>
157
157
 
158
158
  <div class="method-heading">
159
- <a href="Fragment.src/M000100.html" target="Code" class="method-signature"
160
- onclick="popupCode('Fragment.src/M000100.html');return false;">
159
+ <a href="Fragment.src/M000111.html" target="Code" class="method-signature"
160
+ onclick="popupCode('Fragment.src/M000111.html');return false;">
161
161
  <span class="method-name">new</span><span class="method-args">(uri,max_age,body)</span>
162
162
  </a>
163
163
  </div>
@@ -168,12 +168,12 @@ Represents part of the cached page, typically an &lt;esi:include
168
168
 
169
169
  <h3 class="section-bar">Public Instance methods</h3>
170
170
 
171
- <div id="method-M000101" class="method-detail">
172
- <a name="M000101"></a>
171
+ <div id="method-M000112" class="method-detail">
172
+ <a name="M000112"></a>
173
173
 
174
174
  <div class="method-heading">
175
- <a href="Fragment.src/M000101.html" target="Code" class="method-signature"
176
- onclick="popupCode('Fragment.src/M000101.html');return false;">
175
+ <a href="Fragment.src/M000112.html" target="Code" class="method-signature"
176
+ onclick="popupCode('Fragment.src/M000112.html');return false;">
177
177
  <span class="method-name">dup</span><span class="method-args">()</span>
178
178
  </a>
179
179
  </div>
@@ -185,12 +185,12 @@ make a copy of the object, necessary for thread safety
185
185
  </div>
186
186
  </div>
187
187
 
188
- <div id="method-M000102" class="method-detail">
189
- <a name="M000102"></a>
188
+ <div id="method-M000113" class="method-detail">
189
+ <a name="M000113"></a>
190
190
 
191
191
  <div class="method-heading">
192
- <a href="Fragment.src/M000102.html" target="Code" class="method-signature"
193
- onclick="popupCode('Fragment.src/M000102.html');return false;">
192
+ <a href="Fragment.src/M000113.html" target="Code" class="method-signature"
193
+ onclick="popupCode('Fragment.src/M000113.html');return false;">
194
194
  <span class="method-name">valid?</span><span class="method-args">()</span>
195
195
  </a>
196
196
  </div>
@@ -91,7 +91,7 @@ There are few issues to consider about providing a memcached backed.
91
91
  </p>
92
92
  <p>
93
93
  First, there&#8216;s no good way to iterate over all the <a
94
- href="MemcachedCache.html#M000045">keys</a> within memcached and doing so
94
+ href="MemcachedCache.html#M000042">keys</a> within memcached and doing so
95
95
  is problematic beyound the impelmentation more details can be found here
96
96
  =&gt; <a
97
97
  href="http://lists.danga.com/pipermail/memcached/2007-February/003610.html">lists.danga.com/pipermail/memcached/2007-February/003610.html</a>
@@ -131,15 +131,15 @@ Configuring:
131
131
  <h3 class="section-bar">Methods</h3>
132
132
 
133
133
  <div class="name-list">
134
- <a href="#M000041">cached?</a>&nbsp;&nbsp;
135
- <a href="#M000046">delete</a>&nbsp;&nbsp;
136
- <a href="#M000047">delete_unlocked</a>&nbsp;&nbsp;
137
- <a href="#M000042">get</a>&nbsp;&nbsp;
138
- <a href="#M000045">keys</a>&nbsp;&nbsp;
139
- <a href="#M000040">new</a>&nbsp;&nbsp;
140
- <a href="#M000043">put</a>&nbsp;&nbsp;
141
- <a href="#M000044">sweep!</a>&nbsp;&nbsp;
142
- <a href="#M000048">sweep_unlocked!</a>&nbsp;&nbsp;
134
+ <a href="#M000038">cached?</a>&nbsp;&nbsp;
135
+ <a href="#M000043">delete</a>&nbsp;&nbsp;
136
+ <a href="#M000044">delete_unlocked</a>&nbsp;&nbsp;
137
+ <a href="#M000039">get</a>&nbsp;&nbsp;
138
+ <a href="#M000042">keys</a>&nbsp;&nbsp;
139
+ <a href="#M000037">new</a>&nbsp;&nbsp;
140
+ <a href="#M000040">put</a>&nbsp;&nbsp;
141
+ <a href="#M000041">sweep!</a>&nbsp;&nbsp;
142
+ <a href="#M000045">sweep_unlocked!</a>&nbsp;&nbsp;
143
143
  </div>
144
144
  </div>
145
145
 
@@ -168,12 +168,12 @@ Configuring:
168
168
  <div id="methods">
169
169
  <h3 class="section-bar">Public Class methods</h3>
170
170
 
171
- <div id="method-M000040" class="method-detail">
172
- <a name="M000040"></a>
171
+ <div id="method-M000037" class="method-detail">
172
+ <a name="M000037"></a>
173
173
 
174
174
  <div class="method-heading">
175
- <a href="MemcachedCache.src/M000040.html" target="Code" class="method-signature"
176
- onclick="popupCode('MemcachedCache.src/M000040.html');return false;">
175
+ <a href="MemcachedCache.src/M000037.html" target="Code" class="method-signature"
176
+ onclick="popupCode('MemcachedCache.src/M000037.html');return false;">
177
177
  <span class="method-name">new</span><span class="method-args">( options )</span>
178
178
  </a>
179
179
  </div>
@@ -184,12 +184,12 @@ Configuring:
184
184
 
185
185
  <h3 class="section-bar">Public Instance methods</h3>
186
186
 
187
- <div id="method-M000041" class="method-detail">
188
- <a name="M000041"></a>
187
+ <div id="method-M000038" class="method-detail">
188
+ <a name="M000038"></a>
189
189
 
190
190
  <div class="method-heading">
191
- <a href="MemcachedCache.src/M000041.html" target="Code" class="method-signature"
192
- onclick="popupCode('MemcachedCache.src/M000041.html');return false;">
191
+ <a href="MemcachedCache.src/M000038.html" target="Code" class="method-signature"
192
+ onclick="popupCode('MemcachedCache.src/M000038.html');return false;">
193
193
  <span class="method-name">cached?</span><span class="method-args">( uri, params )</span>
194
194
  </a>
195
195
  </div>
@@ -198,12 +198,12 @@ Configuring:
198
198
  </div>
199
199
  </div>
200
200
 
201
- <div id="method-M000046" class="method-detail">
202
- <a name="M000046"></a>
201
+ <div id="method-M000043" class="method-detail">
202
+ <a name="M000043"></a>
203
203
 
204
204
  <div class="method-heading">
205
- <a href="MemcachedCache.src/M000046.html" target="Code" class="method-signature"
206
- onclick="popupCode('MemcachedCache.src/M000046.html');return false;">
205
+ <a href="MemcachedCache.src/M000043.html" target="Code" class="method-signature"
206
+ onclick="popupCode('MemcachedCache.src/M000043.html');return false;">
207
207
  <span class="method-name">delete</span><span class="method-args">( key )</span>
208
208
  </a>
209
209
  </div>
@@ -212,12 +212,12 @@ Configuring:
212
212
  </div>
213
213
  </div>
214
214
 
215
- <div id="method-M000047" class="method-detail">
216
- <a name="M000047"></a>
215
+ <div id="method-M000044" class="method-detail">
216
+ <a name="M000044"></a>
217
217
 
218
218
  <div class="method-heading">
219
- <a href="MemcachedCache.src/M000047.html" target="Code" class="method-signature"
220
- onclick="popupCode('MemcachedCache.src/M000047.html');return false;">
219
+ <a href="MemcachedCache.src/M000044.html" target="Code" class="method-signature"
220
+ onclick="popupCode('MemcachedCache.src/M000044.html');return false;">
221
221
  <span class="method-name">delete_unlocked</span><span class="method-args">( key )</span>
222
222
  </a>
223
223
  </div>
@@ -226,12 +226,12 @@ Configuring:
226
226
  </div>
227
227
  </div>
228
228
 
229
- <div id="method-M000042" class="method-detail">
230
- <a name="M000042"></a>
229
+ <div id="method-M000039" class="method-detail">
230
+ <a name="M000039"></a>
231
231
 
232
232
  <div class="method-heading">
233
- <a href="MemcachedCache.src/M000042.html" target="Code" class="method-signature"
234
- onclick="popupCode('MemcachedCache.src/M000042.html');return false;">
233
+ <a href="MemcachedCache.src/M000039.html" target="Code" class="method-signature"
234
+ onclick="popupCode('MemcachedCache.src/M000039.html');return false;">
235
235
  <span class="method-name">get</span><span class="method-args">( uri, params )</span>
236
236
  </a>
237
237
  </div>
@@ -240,12 +240,12 @@ Configuring:
240
240
  </div>
241
241
  </div>
242
242
 
243
- <div id="method-M000045" class="method-detail">
244
- <a name="M000045"></a>
243
+ <div id="method-M000042" class="method-detail">
244
+ <a name="M000042"></a>
245
245
 
246
246
  <div class="method-heading">
247
- <a href="MemcachedCache.src/M000045.html" target="Code" class="method-signature"
248
- onclick="popupCode('MemcachedCache.src/M000045.html');return false;">
247
+ <a href="MemcachedCache.src/M000042.html" target="Code" class="method-signature"
248
+ onclick="popupCode('MemcachedCache.src/M000042.html');return false;">
249
249
  <span class="method-name">keys</span><span class="method-args">(&amp;block)</span>
250
250
  </a>
251
251
  </div>
@@ -254,12 +254,12 @@ Configuring:
254
254
  </div>
255
255
  </div>
256
256
 
257
- <div id="method-M000043" class="method-detail">
258
- <a name="M000043"></a>
257
+ <div id="method-M000040" class="method-detail">
258
+ <a name="M000040"></a>
259
259
 
260
260
  <div class="method-heading">
261
- <a href="MemcachedCache.src/M000043.html" target="Code" class="method-signature"
262
- onclick="popupCode('MemcachedCache.src/M000043.html');return false;">
261
+ <a href="MemcachedCache.src/M000040.html" target="Code" class="method-signature"
262
+ onclick="popupCode('MemcachedCache.src/M000040.html');return false;">
263
263
  <span class="method-name">put</span><span class="method-args">( uri, params, max_age, body )</span>
264
264
  </a>
265
265
  </div>
@@ -268,12 +268,12 @@ Configuring:
268
268
  </div>
269
269
  </div>
270
270
 
271
- <div id="method-M000044" class="method-detail">
272
- <a name="M000044"></a>
271
+ <div id="method-M000041" class="method-detail">
272
+ <a name="M000041"></a>
273
273
 
274
274
  <div class="method-heading">
275
- <a href="MemcachedCache.src/M000044.html" target="Code" class="method-signature"
276
- onclick="popupCode('MemcachedCache.src/M000044.html');return false;">
275
+ <a href="MemcachedCache.src/M000041.html" target="Code" class="method-signature"
276
+ onclick="popupCode('MemcachedCache.src/M000041.html');return false;">
277
277
  <span class="method-name">sweep!</span><span class="method-args">()</span>
278
278
  </a>
279
279
  </div>
@@ -285,12 +285,12 @@ run through the cache and dump anything that has expired
285
285
  </div>
286
286
  </div>
287
287
 
288
- <div id="method-M000048" class="method-detail">
289
- <a name="M000048"></a>
288
+ <div id="method-M000045" class="method-detail">
289
+ <a name="M000045"></a>
290
290
 
291
291
  <div class="method-heading">
292
- <a href="MemcachedCache.src/M000048.html" target="Code" class="method-signature"
293
- onclick="popupCode('MemcachedCache.src/M000048.html');return false;">
292
+ <a href="MemcachedCache.src/M000045.html" target="Code" class="method-signature"
293
+ onclick="popupCode('MemcachedCache.src/M000045.html');return false;">
294
294
  <span class="method-name">sweep_unlocked!</span><span class="method-args">()</span>
295
295
  </a>
296
296
  </div>
@@ -0,0 +1,24 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>new (ESI::MemcachedCache)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre> <span class="ruby-comment cmt"># File lib/esi/cache.rb, line 103</span>
14
+ 103: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>( <span class="ruby-identifier">options</span> )
15
+ 104: <span class="ruby-keyword kw">super</span>()
16
+ 105: <span class="ruby-identifier">options</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">marshal_dump</span>
17
+ 106: <span class="ruby-identifier">options</span>.<span class="ruby-identifier">merge!</span>( <span class="ruby-identifier">:multithread</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">true</span> )
18
+ 107: <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;Using memcache with options =&gt; #{options.inspect}&quot;</span>
19
+ 108: <span class="ruby-ivar">@cache</span> = <span class="ruby-constant">MemCache</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">options</span>
20
+ 109: <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;Using memcache servers at #{options[:servers].inspect}&quot;</span>
21
+ 110: <span class="ruby-ivar">@cache</span>.<span class="ruby-identifier">servers</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:servers</span>]
22
+ 111: <span class="ruby-keyword kw">end</span></pre>
23
+ </body>
24
+ </html>
@@ -0,0 +1,22 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>cached? (ESI::MemcachedCache)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre> <span class="ruby-comment cmt"># File lib/esi/cache.rb, line 113</span>
14
+ 113: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cached?</span>( <span class="ruby-identifier">uri</span>, <span class="ruby-identifier">params</span> )
15
+ 114: <span class="ruby-identifier">fragment</span> = <span class="ruby-identifier">get</span>(<span class="ruby-identifier">uri</span>,<span class="ruby-identifier">params</span>)
16
+ 115: <span class="ruby-identifier">fragment</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">fragment</span>.<span class="ruby-identifier">valid?</span>
17
+ 116: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Object</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span> <span class="ruby-comment cmt"># never raise an exception from this method</span>
18
+ 117: <span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;error in #{__FILE__}:#{__LINE__}&quot;</span>
19
+ 118: <span class="ruby-keyword kw">false</span>
20
+ 119: <span class="ruby-keyword kw">end</span></pre>
21
+ </body>
22
+ </html>
@@ -0,0 +1,19 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>get (ESI::MemcachedCache)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre> <span class="ruby-comment cmt"># File lib/esi/cache.rb, line 121</span>
14
+ 121: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get</span>( <span class="ruby-identifier">uri</span>, <span class="ruby-identifier">params</span> )
15
+ 122: <span class="ruby-identifier">fragment</span> = <span class="ruby-ivar">@cache</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">cache_key</span>(<span class="ruby-identifier">uri</span>,<span class="ruby-identifier">params</span>))
16
+ 123: <span class="ruby-identifier">fragment</span>.<span class="ruby-identifier">dup</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">fragment</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">fragment</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:dup</span>)
17
+ 124: <span class="ruby-keyword kw">end</span></pre>
18
+ </body>
19
+ </html>
@@ -5,20 +5,19 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>new (ESI::MemcachedCache)</title>
8
+ <title>put (ESI::MemcachedCache)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/esi/cache.rb, line 99</span>
14
- 99: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>( <span class="ruby-identifier">options</span> )
15
- 100: <span class="ruby-keyword kw">super</span>()
16
- 101: <span class="ruby-identifier">options</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">marshal_dump</span>
17
- 102: <span class="ruby-identifier">options</span>.<span class="ruby-identifier">merge!</span>( <span class="ruby-identifier">:multithread</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">true</span> )
18
- 103: <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;Using memcache with options =&gt; #{options.inspect}&quot;</span>
19
- 104: <span class="ruby-ivar">@cache</span> = <span class="ruby-constant">MemCache</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">options</span>
20
- 105: <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;Using memcache servers at #{options[:servers].inspect}&quot;</span>
21
- 106: <span class="ruby-ivar">@cache</span>.<span class="ruby-identifier">servers</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:servers</span>]
22
- 107: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/esi/cache.rb, line 126</span>
14
+ 126: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">put</span>( <span class="ruby-identifier">uri</span>, <span class="ruby-identifier">params</span>, <span class="ruby-identifier">max_age</span>, <span class="ruby-identifier">body</span> )
15
+ 127: <span class="ruby-identifier">fragment</span> = <span class="ruby-constant">Fragment</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">uri</span>,<span class="ruby-identifier">max_age</span>,<span class="ruby-identifier">body</span>)
16
+ 128: <span class="ruby-identifier">key</span> = <span class="ruby-identifier">cache_key</span>(<span class="ruby-identifier">uri</span>,<span class="ruby-identifier">params</span>)
17
+ 129: <span class="ruby-ivar">@cache</span>.<span class="ruby-identifier">add</span>( <span class="ruby-identifier">key</span>, <span class="ruby-identifier">fragment</span>, <span class="ruby-identifier">fragment</span>.<span class="ruby-identifier">max_age</span> )
18
+ 130: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Object</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
19
+ 131: <span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;error in #{__FILE__}:#{__LINE__}&quot;</span>
20
+ 132: <span class="ruby-identifier">log_error</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">message</span>
21
+ 133: <span class="ruby-keyword kw">end</span></pre>
23
22
  </body>
24
23
  </html>
@@ -5,18 +5,14 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>cached? (ESI::MemcachedCache)</title>
8
+ <title>sweep! (ESI::MemcachedCache)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/esi/cache.rb, line 109</span>
14
- 109: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cached?</span>( <span class="ruby-identifier">uri</span>, <span class="ruby-identifier">params</span> )
15
- 110: <span class="ruby-identifier">fragment</span> = <span class="ruby-identifier">get</span>(<span class="ruby-identifier">uri</span>,<span class="ruby-identifier">params</span>)
16
- 111: <span class="ruby-identifier">fragment</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">fragment</span>.<span class="ruby-identifier">valid?</span>
17
- 112: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Object</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span> <span class="ruby-comment cmt"># never raise an exception from this method</span>
18
- 113: <span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;error in #{__FILE__}:#{__LINE__}&quot;</span>
19
- 114: <span class="ruby-keyword kw">false</span>
20
- 115: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/esi/cache.rb, line 136</span>
14
+ 136: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sweep!</span>
15
+ 137: <span class="ruby-comment cmt"># TODO: not really a memcached equivalent??</span>
16
+ 138: <span class="ruby-keyword kw">end</span></pre>
21
17
  </body>
22
18
  </html>
@@ -5,15 +5,15 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>get (ESI::MemcachedCache)</title>
8
+ <title>keys (ESI::MemcachedCache)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/esi/cache.rb, line 117</span>
14
- 117: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get</span>( <span class="ruby-identifier">uri</span>, <span class="ruby-identifier">params</span> )
15
- 118: <span class="ruby-identifier">fragment</span> = <span class="ruby-ivar">@cache</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">cache_key</span>(<span class="ruby-identifier">uri</span>,<span class="ruby-identifier">params</span>))
16
- 119: <span class="ruby-identifier">fragment</span>.<span class="ruby-identifier">dup</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">fragment</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">fragment</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:dup</span>)
17
- 120: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/esi/cache.rb, line 140</span>
14
+ 140: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">keys</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
15
+ 141: <span class="ruby-comment cmt"># TODO: can't implement this method directly with memcached, unless we introduce another key</span>
16
+ 142: <span class="ruby-comment cmt"># and increase the data, but it is possible...</span>
17
+ 143: <span class="ruby-keyword kw">end</span></pre>
18
18
  </body>
19
19
  </html>