mongrel_esi 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (202) hide show
  1. data/Rakefile +14 -6
  2. data/doc/rdoc/classes/ESI/CParser.html +122 -0
  3. data/doc/rdoc/classes/ESI/Cache.html +178 -0
  4. data/doc/rdoc/classes/ESI/Cache.src/M000085.html +17 -0
  5. data/doc/rdoc/classes/ESI/Cache.src/M000086.html +20 -0
  6. data/doc/rdoc/classes/ESI/Config.html +333 -0
  7. data/doc/rdoc/classes/ESI/Config.src/M000052.html +18 -0
  8. data/doc/rdoc/classes/ESI/Config.src/M000053.html +18 -0
  9. data/doc/rdoc/classes/ESI/Config.src/M000054.html +35 -0
  10. data/doc/rdoc/classes/ESI/Config.src/M000055.html +38 -0
  11. data/doc/rdoc/classes/ESI/Config.src/M000056.html +23 -0
  12. data/doc/rdoc/classes/ESI/Config.src/M000057.html +18 -0
  13. data/doc/rdoc/classes/ESI/Config.src/M000058.html +20 -0
  14. data/doc/rdoc/classes/ESI/Config.src/M000059.html +18 -0
  15. data/doc/rdoc/classes/ESI/Config.src/M000060.html +24 -0
  16. data/doc/rdoc/classes/ESI/Config/CacheConfig.html +212 -0
  17. data/doc/rdoc/classes/ESI/Config/CacheConfig.src/M000064.html +19 -0
  18. data/doc/rdoc/classes/ESI/Config/CacheConfig.src/M000065.html +19 -0
  19. data/doc/rdoc/classes/ESI/Config/CacheConfig.src/M000066.html +18 -0
  20. data/doc/rdoc/classes/ESI/Config/CacheConfig.src/M000067.html +18 -0
  21. data/doc/rdoc/classes/ESI/Config/CacheConfig.src/M000068.html +18 -0
  22. data/doc/rdoc/classes/ESI/Config/ConfigRouter.html +187 -0
  23. data/doc/rdoc/classes/ESI/Config/ConfigRouter.src/M000061.html +19 -0
  24. data/doc/rdoc/classes/ESI/Config/ConfigRouter.src/M000062.html +21 -0
  25. data/doc/rdoc/classes/ESI/Config/ConfigRouter.src/M000063.html +21 -0
  26. data/doc/rdoc/classes/ESI/Dispatcher.html +172 -0
  27. data/doc/rdoc/classes/ESI/Dispatcher.src/M000087.html +22 -0
  28. data/doc/rdoc/classes/ESI/Dispatcher.src/M000088.html +18 -0
  29. data/doc/rdoc/classes/ESI/Fragment.html +218 -0
  30. data/doc/rdoc/classes/ESI/Fragment.src/M000100.html +20 -0
  31. data/doc/rdoc/classes/ESI/Fragment.src/M000101.html +18 -0
  32. data/doc/rdoc/classes/ESI/Fragment.src/M000102.html +18 -0
  33. data/doc/rdoc/classes/ESI/Invalidator.html +131 -0
  34. data/doc/rdoc/classes/ESI/Invalidator.src/M000004.html +41 -0
  35. data/doc/rdoc/classes/ESI/Log.html +221 -0
  36. data/doc/rdoc/classes/ESI/Log.src/M000030.html +18 -0
  37. data/doc/rdoc/classes/ESI/Log.src/M000031.html +18 -0
  38. data/doc/rdoc/classes/ESI/Log.src/M000032.html +18 -0
  39. data/doc/rdoc/classes/ESI/Log.src/M000033.html +18 -0
  40. data/doc/rdoc/classes/ESI/Log.src/M000034.html +18 -0
  41. data/doc/rdoc/classes/ESI/Log.src/M000035.html +18 -0
  42. data/doc/rdoc/classes/ESI/Log.src/M000036.html +18 -0
  43. data/doc/rdoc/classes/ESI/MemcachedCache.html +314 -0
  44. data/doc/rdoc/classes/ESI/MemcachedCache.src/M000040.html +24 -0
  45. data/doc/rdoc/classes/ESI/MemcachedCache.src/M000041.html +22 -0
  46. data/doc/rdoc/classes/ESI/MemcachedCache.src/M000042.html +19 -0
  47. data/doc/rdoc/classes/ESI/MemcachedCache.src/M000043.html +23 -0
  48. data/doc/rdoc/classes/ESI/MemcachedCache.src/M000044.html +18 -0
  49. data/doc/rdoc/classes/ESI/MemcachedCache.src/M000045.html +19 -0
  50. data/doc/rdoc/classes/ESI/MemcachedCache.src/M000046.html +18 -0
  51. data/doc/rdoc/classes/ESI/MemcachedCache.src/M000047.html +18 -0
  52. data/doc/rdoc/classes/ESI/MemcachedCache.src/M000048.html +17 -0
  53. data/doc/rdoc/classes/ESI/Parser.html +184 -0
  54. data/doc/rdoc/classes/ESI/Parser.src/M000049.html +51 -0
  55. data/doc/rdoc/classes/ESI/Parser.src/M000050.html +39 -0
  56. data/doc/rdoc/classes/ESI/Parser.src/M000051.html +19 -0
  57. data/doc/rdoc/classes/ESI/Processor.html +194 -0
  58. data/doc/rdoc/classes/ESI/Processor.src/M000037.html +26 -0
  59. data/doc/rdoc/classes/ESI/Processor.src/M000038.html +44 -0
  60. data/doc/rdoc/classes/ESI/Processor.src/M000039.html +26 -0
  61. data/doc/rdoc/classes/ESI/Proxy.html +304 -0
  62. data/doc/rdoc/classes/ESI/Proxy.src/M000069.html +20 -0
  63. data/doc/rdoc/classes/ESI/Proxy.src/M000070.html +55 -0
  64. data/doc/rdoc/classes/ESI/Proxy.src/M000071.html +53 -0
  65. data/doc/rdoc/classes/ESI/Proxy.src/M000072.html +25 -0
  66. data/doc/rdoc/classes/ESI/Proxy.src/M000073.html +19 -0
  67. data/doc/rdoc/classes/ESI/Proxy.src/M000074.html +27 -0
  68. data/doc/rdoc/classes/ESI/Proxy.src/M000075.html +18 -0
  69. data/doc/rdoc/classes/ESI/Proxy.src/M000076.html +28 -0
  70. data/doc/rdoc/classes/ESI/Proxy.src/M000077.html +29 -0
  71. data/doc/rdoc/classes/ESI/Response.html +250 -0
  72. data/doc/rdoc/classes/ESI/Response.src/M000078.html +23 -0
  73. data/doc/rdoc/classes/ESI/Response.src/M000079.html +18 -0
  74. data/doc/rdoc/classes/ESI/Response.src/M000080.html +21 -0
  75. data/doc/rdoc/classes/ESI/Response.src/M000081.html +20 -0
  76. data/doc/rdoc/classes/ESI/Response.src/M000082.html +25 -0
  77. data/doc/rdoc/classes/ESI/Response.src/M000083.html +18 -0
  78. data/doc/rdoc/classes/ESI/Response.src/M000084.html +33 -0
  79. data/doc/rdoc/classes/ESI/Router.html +212 -0
  80. data/doc/rdoc/classes/ESI/Router.src/M000098.html +36 -0
  81. data/doc/rdoc/classes/ESI/Router.src/M000099.html +25 -0
  82. data/doc/rdoc/classes/ESI/RubyCache.html +278 -0
  83. data/doc/rdoc/classes/ESI/RubyCache.src/M000089.html +20 -0
  84. data/doc/rdoc/classes/ESI/RubyCache.src/M000090.html +20 -0
  85. data/doc/rdoc/classes/ESI/RubyCache.src/M000091.html +20 -0
  86. data/doc/rdoc/classes/ESI/RubyCache.src/M000092.html +22 -0
  87. data/doc/rdoc/classes/ESI/RubyCache.src/M000093.html +18 -0
  88. data/doc/rdoc/classes/ESI/RubyCache.src/M000094.html +22 -0
  89. data/doc/rdoc/classes/ESI/RubyCache.src/M000095.html +18 -0
  90. data/doc/rdoc/classes/ESI/RubyCache.src/M000096.html +18 -0
  91. data/doc/rdoc/classes/ESI/RubyCache.src/M000097.html +18 -0
  92. data/doc/rdoc/classes/ESI/Tag.html +141 -0
  93. data/doc/rdoc/classes/ESI/Tag/Attempt.html +113 -0
  94. data/doc/rdoc/classes/ESI/Tag/Base.html +237 -0
  95. data/doc/rdoc/classes/ESI/Tag/Base.src/M000026.html +23 -0
  96. data/doc/rdoc/classes/ESI/Tag/Base.src/M000027.html +22 -0
  97. data/doc/rdoc/classes/ESI/Tag/Base.src/M000028.html +22 -0
  98. data/doc/rdoc/classes/ESI/Tag/Base.src/M000029.html +17 -0
  99. data/doc/rdoc/classes/ESI/Tag/Container.html +206 -0
  100. data/doc/rdoc/classes/ESI/Tag/Container.src/M000015.html +20 -0
  101. data/doc/rdoc/classes/ESI/Tag/Container.src/M000016.html +22 -0
  102. data/doc/rdoc/classes/ESI/Tag/Container.src/M000017.html +25 -0
  103. data/doc/rdoc/classes/ESI/Tag/Except.html +184 -0
  104. data/doc/rdoc/classes/ESI/Tag/Except.src/M000018.html +21 -0
  105. data/doc/rdoc/classes/ESI/Tag/Except.src/M000019.html +20 -0
  106. data/doc/rdoc/classes/ESI/Tag/Except.src/M000020.html +18 -0
  107. data/doc/rdoc/classes/ESI/Tag/Include.html +257 -0
  108. data/doc/rdoc/classes/ESI/Tag/Include.src/M000005.html +20 -0
  109. data/doc/rdoc/classes/ESI/Tag/Include.src/M000006.html +18 -0
  110. data/doc/rdoc/classes/ESI/Tag/Include.src/M000007.html +34 -0
  111. data/doc/rdoc/classes/ESI/Tag/Include.src/M000008.html +22 -0
  112. data/doc/rdoc/classes/ESI/Tag/Include.src/M000009.html +27 -0
  113. data/doc/rdoc/classes/ESI/Tag/Include.src/M000010.html +30 -0
  114. data/doc/rdoc/classes/ESI/Tag/Include.src/M000011.html +51 -0
  115. data/doc/rdoc/classes/ESI/Tag/Include/Request.html +199 -0
  116. data/doc/rdoc/classes/ESI/Tag/Include/Request.src/M000012.html +18 -0
  117. data/doc/rdoc/classes/ESI/Tag/Include/Request.src/M000013.html +44 -0
  118. data/doc/rdoc/classes/ESI/Tag/Include/Request/Error.html +155 -0
  119. data/doc/rdoc/classes/ESI/Tag/Include/Request/Error.src/M000014.html +19 -0
  120. data/doc/rdoc/classes/ESI/Tag/Invalidate.html +171 -0
  121. data/doc/rdoc/classes/ESI/Tag/Invalidate.src/M000023.html +19 -0
  122. data/doc/rdoc/classes/ESI/Tag/Invalidate.src/M000024.html +51 -0
  123. data/doc/rdoc/classes/ESI/Tag/Invalidate.src/M000025.html +19 -0
  124. data/doc/rdoc/classes/ESI/Tag/Try.html +154 -0
  125. data/doc/rdoc/classes/ESI/Tag/Try.src/M000021.html +38 -0
  126. data/doc/rdoc/classes/ESI/Tag/Try.src/M000022.html +18 -0
  127. data/doc/rdoc/classes/MultiDirHandler.html +198 -0
  128. data/doc/rdoc/classes/MultiDirHandler.src/M000001.html +20 -0
  129. data/doc/rdoc/classes/MultiDirHandler.src/M000002.html +28 -0
  130. data/doc/rdoc/classes/MultiDirHandler.src/M000003.html +22 -0
  131. data/doc/rdoc/created.rid +1 -0
  132. data/doc/rdoc/files/COPYING.html +167 -0
  133. data/doc/rdoc/files/LICENSE.html +605 -0
  134. data/doc/rdoc/files/README.html +359 -0
  135. data/doc/rdoc/files/ext/esi/common_rl.html +160 -0
  136. data/doc/rdoc/files/ext/esi/esi_parser_c.html +101 -0
  137. data/doc/rdoc/files/ext/esi/parser_c.html +101 -0
  138. data/doc/rdoc/files/ext/esi/parser_h.html +101 -0
  139. data/doc/rdoc/files/ext/esi/parser_rl.html +827 -0
  140. data/doc/rdoc/files/ext/esi/test/common_rl.html +160 -0
  141. data/doc/rdoc/files/ext/esi/test/parser_c.html +101 -0
  142. data/doc/rdoc/files/ext/esi/test/parser_h.html +101 -0
  143. data/doc/rdoc/files/ext/esi/test/parser_rl.html +827 -0
  144. data/doc/rdoc/files/ext/esi/test/sp_c.html +101 -0
  145. data/doc/rdoc/files/ext/esi/test/test_c.html +101 -0
  146. data/doc/rdoc/files/lib/esi/cache_rb.html +119 -0
  147. data/doc/rdoc/files/lib/esi/config_rb.html +114 -0
  148. data/doc/rdoc/files/lib/esi/dispatcher_rb.html +108 -0
  149. data/doc/rdoc/files/lib/esi/invalidator_rb.html +114 -0
  150. data/doc/rdoc/files/lib/esi/logger_rb.html +108 -0
  151. data/doc/rdoc/files/lib/esi/parser_rb.html +120 -0
  152. data/doc/rdoc/files/lib/esi/processor_rb.html +115 -0
  153. data/doc/rdoc/files/lib/esi/proxy_rb.html +123 -0
  154. data/doc/rdoc/files/lib/esi/response_rb.html +116 -0
  155. data/doc/rdoc/files/lib/esi/router_rb.html +107 -0
  156. data/doc/rdoc/files/lib/esi/tag/attempt_rb.html +114 -0
  157. data/doc/rdoc/files/lib/esi/tag/base_rb.html +114 -0
  158. data/doc/rdoc/files/lib/esi/tag/container_rb.html +115 -0
  159. data/doc/rdoc/files/lib/esi/tag/except_rb.html +114 -0
  160. data/doc/rdoc/files/lib/esi/tag/include_rb.html +116 -0
  161. data/doc/rdoc/files/lib/esi/tag/invalidate_rb.html +115 -0
  162. data/doc/rdoc/files/lib/esi/tag/try_rb.html +115 -0
  163. data/doc/rdoc/files/lib/esi/version_rb.html +101 -0
  164. data/doc/rdoc/files/lib/multi_dirhandler_rb.html +109 -0
  165. data/doc/rdoc/fr_class_index.html +53 -0
  166. data/doc/rdoc/fr_file_index.html +59 -0
  167. data/doc/rdoc/fr_method_index.html +128 -0
  168. data/doc/rdoc/index.html +24 -0
  169. data/doc/rdoc/rdoc-style.css +208 -0
  170. data/ext/esi/esi_parser.c +12 -1
  171. data/ext/esi/parser.c +492 -3927
  172. data/ext/esi/parser.rl +83 -14
  173. data/ext/esi/test/parser.c +1587 -367
  174. data/ext/esi/test/parser.rl +83 -14
  175. data/ext/esi/test/sp.c +125 -0
  176. data/ext/esi/test/test.c +198 -6
  177. data/lib/esi/cache.rb +5 -8
  178. data/lib/esi/config.rb +3 -3
  179. data/lib/esi/dispatcher.rb +2 -4
  180. data/lib/esi/parser.rb +26 -13
  181. data/lib/esi/processor.rb +13 -35
  182. data/lib/esi/proxy.rb +113 -44
  183. data/lib/esi/response.rb +23 -55
  184. data/lib/esi/router.rb +0 -11
  185. data/lib/esi/tag/attempt.rb +2 -1
  186. data/lib/esi/tag/base.rb +1 -24
  187. data/lib/esi/tag/container.rb +40 -0
  188. data/lib/esi/tag/except.rb +3 -1
  189. data/lib/esi/tag/include.rb +53 -62
  190. data/lib/esi/tag/try.rb +16 -18
  191. data/lib/esi/version.rb +9 -0
  192. data/test/integration/handler_test.rb +49 -12
  193. data/test/integration/help.rb +12 -0
  194. data/test/load_test.rb +8 -4
  195. data/test/load_test_ab.rb +8 -0
  196. data/test/sample.html +31 -0
  197. data/test/unit/help.rb +12 -8
  198. data/test/unit/include_request_test.rb +14 -21
  199. data/test/unit/parser_test.rb +2 -1
  200. data/test/unit/response_test.rb +4 -8
  201. data/tools/rakehelp.rb +1 -1
  202. metadata +216 -5
@@ -0,0 +1,41 @@
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>start (ESI::Invalidator)</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/invalidator.rb, line 14</span>
14
+ 14: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">start</span>( <span class="ruby-identifier">cache</span> )
15
+ 15: <span class="ruby-constant">Thread</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">cache</span> ) <span class="ruby-keyword kw">do</span><span class="ruby-operator">|</span><span class="ruby-identifier">cache</span><span class="ruby-operator">|</span>
16
+ 16: <span class="ruby-identifier">s</span> = <span class="ruby-constant">WEBrick</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTPServer</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">:Port</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">4001</span> )
17
+ 17:
18
+ 18: <span class="ruby-identifier">s</span>.<span class="ruby-identifier">mount_proc</span>(<span class="ruby-value str">&quot;/invalidate&quot;</span>){<span class="ruby-operator">|</span><span class="ruby-identifier">req</span>, <span class="ruby-identifier">res</span><span class="ruby-operator">|</span>
19
+ 19: <span class="ruby-identifier">res</span>.<span class="ruby-identifier">body</span> = <span class="ruby-value str">&quot;&lt;html&gt;invalidate posted objects&lt;/html&gt;&quot;</span>
20
+ 20: <span class="ruby-identifier">res</span>[<span class="ruby-value str">'Content-Type'</span>] = <span class="ruby-value str">&quot;text/html&quot;</span>
21
+ 21: }
22
+ 22:
23
+ 23: <span class="ruby-identifier">s</span>.<span class="ruby-identifier">mount_proc</span>(<span class="ruby-value str">&quot;/status&quot;</span>){<span class="ruby-operator">|</span><span class="ruby-identifier">req</span>, <span class="ruby-identifier">res</span><span class="ruby-operator">|</span>
24
+ 24: <span class="ruby-identifier">res</span>.<span class="ruby-identifier">body</span> = <span class="ruby-value str">&quot;&lt;html&gt;&lt;body&gt;&lt;h1&gt;Cached objects&lt;/h1&gt;&quot;</span>
25
+ 25: <span class="ruby-identifier">res</span>.<span class="ruby-identifier">body</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;&lt;ul&gt;&quot;</span>
26
+ 26: <span class="ruby-identifier">cache</span>.<span class="ruby-identifier">keys</span> <span class="ruby-keyword kw">do</span><span class="ruby-operator">|</span><span class="ruby-identifier">key</span>,<span class="ruby-identifier">data</span><span class="ruby-operator">|</span>
27
+ 27: <span class="ruby-identifier">res</span>.<span class="ruby-identifier">body</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;&lt;li&gt;#{key}&lt;/li&gt;&quot;</span>
28
+ 28: <span class="ruby-keyword kw">end</span>
29
+ 29: <span class="ruby-identifier">res</span>.<span class="ruby-identifier">body</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;&lt;/ul&gt;&quot;</span>
30
+ 30: <span class="ruby-identifier">res</span>.<span class="ruby-identifier">body</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;&lt;/body&gt;&quot;</span>
31
+ 31: <span class="ruby-identifier">res</span>.<span class="ruby-identifier">body</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;&lt;/html&gt;&quot;</span>
32
+ 32: <span class="ruby-identifier">res</span>[<span class="ruby-value str">'Content-Type'</span>] = <span class="ruby-value str">&quot;text/html&quot;</span>
33
+ 33: }
34
+ 34:
35
+ 35: <span class="ruby-comment cmt"># XXX: this doesn't chain so ends up removing the mongrel trap locking the server up</span>
36
+ 36: <span class="ruby-comment cmt">#trap(&quot;INT&quot;){ s.shutdown }</span>
37
+ 37: <span class="ruby-identifier">s</span>.<span class="ruby-identifier">start</span>
38
+ 38: <span class="ruby-keyword kw">end</span>
39
+ 39: <span class="ruby-keyword kw">end</span></pre>
40
+ </body>
41
+ </html>
@@ -0,0 +1,221 @@
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 xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Module: ESI::Log</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Module</strong></td>
53
+ <td class="class-name-in-header">ESI::Log</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/esi/logger_rb.html">
59
+ lib/esi/logger.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ </table>
66
+ </div>
67
+ <!-- banner header -->
68
+
69
+ <div id="bodyContent">
70
+
71
+
72
+
73
+ <div id="contextContent">
74
+
75
+
76
+
77
+ </div>
78
+
79
+ <div id="method-list">
80
+ <h3 class="section-bar">Methods</h3>
81
+
82
+ <div class="name-list">
83
+ <a href="#M000032">log</a>&nbsp;&nbsp;
84
+ <a href="#M000035">log_debug</a>&nbsp;&nbsp;
85
+ <a href="#M000036">log_error</a>&nbsp;&nbsp;
86
+ <a href="#M000034">log_request</a>&nbsp;&nbsp;
87
+ <a href="#M000033">msg</a>&nbsp;&nbsp;
88
+ <a href="#M000031">print</a>&nbsp;&nbsp;
89
+ <a href="#M000030">puts</a>&nbsp;&nbsp;
90
+ </div>
91
+ </div>
92
+
93
+ </div>
94
+
95
+
96
+ <!-- if includes -->
97
+
98
+ <div id="section">
99
+
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+ <!-- if method_list -->
108
+ <div id="methods">
109
+ <h3 class="section-bar">Public Instance methods</h3>
110
+
111
+ <div id="method-M000032" class="method-detail">
112
+ <a name="M000032"></a>
113
+
114
+ <div class="method-heading">
115
+ <a href="Log.src/M000032.html" target="Code" class="method-signature"
116
+ onclick="popupCode('Log.src/M000032.html');return false;">
117
+ <span class="method-name">log</span><span class="method-args">( io, msg )</span>
118
+ </a>
119
+ </div>
120
+
121
+ <div class="method-description">
122
+ </div>
123
+ </div>
124
+
125
+ <div id="method-M000035" class="method-detail">
126
+ <a name="M000035"></a>
127
+
128
+ <div class="method-heading">
129
+ <a href="Log.src/M000035.html" target="Code" class="method-signature"
130
+ onclick="popupCode('Log.src/M000035.html');return false;">
131
+ <span class="method-name">log_debug</span><span class="method-args">( msg )</span>
132
+ </a>
133
+ </div>
134
+
135
+ <div class="method-description">
136
+ </div>
137
+ </div>
138
+
139
+ <div id="method-M000036" class="method-detail">
140
+ <a name="M000036"></a>
141
+
142
+ <div class="method-heading">
143
+ <a href="Log.src/M000036.html" target="Code" class="method-signature"
144
+ onclick="popupCode('Log.src/M000036.html');return false;">
145
+ <span class="method-name">log_error</span><span class="method-args">( msg )</span>
146
+ </a>
147
+ </div>
148
+
149
+ <div class="method-description">
150
+ </div>
151
+ </div>
152
+
153
+ <div id="method-M000034" class="method-detail">
154
+ <a name="M000034"></a>
155
+
156
+ <div class="method-heading">
157
+ <a href="Log.src/M000034.html" target="Code" class="method-signature"
158
+ onclick="popupCode('Log.src/M000034.html');return false;">
159
+ <span class="method-name">log_request</span><span class="method-args">( msg )</span>
160
+ </a>
161
+ </div>
162
+
163
+ <div class="method-description">
164
+ </div>
165
+ </div>
166
+
167
+ <div id="method-M000033" class="method-detail">
168
+ <a name="M000033"></a>
169
+
170
+ <div class="method-heading">
171
+ <a href="Log.src/M000033.html" target="Code" class="method-signature"
172
+ onclick="popupCode('Log.src/M000033.html');return false;">
173
+ <span class="method-name">msg</span><span class="method-args">( io, msg )</span>
174
+ </a>
175
+ </div>
176
+
177
+ <div class="method-description">
178
+ </div>
179
+ </div>
180
+
181
+ <div id="method-M000031" class="method-detail">
182
+ <a name="M000031"></a>
183
+
184
+ <div class="method-heading">
185
+ <a href="Log.src/M000031.html" target="Code" class="method-signature"
186
+ onclick="popupCode('Log.src/M000031.html');return false;">
187
+ <span class="method-name">print</span><span class="method-args">( msg )</span>
188
+ </a>
189
+ </div>
190
+
191
+ <div class="method-description">
192
+ </div>
193
+ </div>
194
+
195
+ <div id="method-M000030" class="method-detail">
196
+ <a name="M000030"></a>
197
+
198
+ <div class="method-heading">
199
+ <a href="Log.src/M000030.html" target="Code" class="method-signature"
200
+ onclick="popupCode('Log.src/M000030.html');return false;">
201
+ <span class="method-name">puts</span><span class="method-args">( msg )</span>
202
+ </a>
203
+ </div>
204
+
205
+ <div class="method-description">
206
+ </div>
207
+ </div>
208
+
209
+
210
+ </div>
211
+
212
+
213
+ </div>
214
+
215
+
216
+ <div id="validator-badges">
217
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
218
+ </div>
219
+
220
+ </body>
221
+ </html>
@@ -0,0 +1,18 @@
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>puts (ESI::Log)</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/logger.rb, line 9</span>
14
+ 9: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">puts</span>( <span class="ruby-identifier">msg</span> )
15
+ 10: <span class="ruby-identifier">debug</span>( <span class="ruby-identifier">msg</span> )
16
+ 11: <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,18 @@
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>print (ESI::Log)</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/logger.rb, line 12</span>
14
+ 12: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">print</span>( <span class="ruby-identifier">msg</span> )
15
+ 13: <span class="ruby-identifier">debug</span>( <span class="ruby-identifier">msg</span> )
16
+ 14: <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,18 @@
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>log (ESI::Log)</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/logger.rb, line 18</span>
14
+ 18: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">log</span>( <span class="ruby-identifier">io</span>, <span class="ruby-identifier">msg</span> )
15
+ 19: <span class="ruby-identifier">io</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">msg</span>
16
+ 20: <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,18 @@
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>msg (ESI::Log)</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/logger.rb, line 22</span>
14
+ 22: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">msg</span>( <span class="ruby-identifier">io</span>, <span class="ruby-identifier">msg</span> )
15
+ 23: <span class="ruby-identifier">io</span>.<span class="ruby-identifier">print</span> <span class="ruby-identifier">msg</span>
16
+ 24: <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,18 @@
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>log_request (ESI::Log)</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/logger.rb, line 26</span>
14
+ 26: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">log_request</span>( <span class="ruby-identifier">msg</span> )
15
+ 27: <span class="ruby-identifier">msg</span>( <span class="ruby-identifier">$logger</span> <span class="ruby-operator">||</span> <span class="ruby-constant">STDERR</span>, <span class="ruby-identifier">msg</span> )
16
+ 28: <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,18 @@
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>log_debug (ESI::Log)</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/logger.rb, line 30</span>
14
+ 30: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">log_debug</span>( <span class="ruby-identifier">msg</span> )
15
+ 31: <span class="ruby-identifier">log</span>( <span class="ruby-identifier">$logger</span> <span class="ruby-operator">||</span> <span class="ruby-constant">STDERR</span>, <span class="ruby-identifier">msg</span> )
16
+ 32: <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,18 @@
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>log_error (ESI::Log)</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/logger.rb, line 34</span>
14
+ 34: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">log_error</span>( <span class="ruby-identifier">msg</span> )
15
+ 35: <span class="ruby-identifier">log</span>( <span class="ruby-identifier">$logger</span> <span class="ruby-operator">||</span> <span class="ruby-constant">STDERR</span>, <span class="ruby-identifier">msg</span> )
16
+ 36: <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,314 @@
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 xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Class: ESI::MemcachedCache</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">ESI::MemcachedCache</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/esi/cache_rb.html">
59
+ lib/esi/cache.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ <a href="Cache.html">
69
+ Cache
70
+ </a>
71
+ </td>
72
+ </tr>
73
+ </table>
74
+ </div>
75
+ <!-- banner header -->
76
+
77
+ <div id="bodyContent">
78
+
79
+
80
+
81
+ <div id="contextContent">
82
+
83
+ <div id="description">
84
+ <p>
85
+ A memcache cache store. Uses the memcached ruby client, see =&gt; <a
86
+ href="http://seattlerb.rubyforge.org/memcache-client">seattlerb.rubyforge.org/memcache-client</a>/
87
+ and <a href="http://www.danga.com/memcached">www.danga.com/memcached</a>/
88
+ </p>
89
+ <p>
90
+ There are few issues to consider about providing a memcached backed.
91
+ </p>
92
+ <p>
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
95
+ is problematic beyound the impelmentation more details can be found here
96
+ =&gt; <a
97
+ href="http://lists.danga.com/pipermail/memcached/2007-February/003610.html">lists.danga.com/pipermail/memcached/2007-February/003610.html</a>
98
+ </p>
99
+ <p>
100
+ Okay, so now what? Well we still have options:
101
+ </p>
102
+ <pre>
103
+ - We could try Tugela Cache =&gt; http://meta.wikimedia.org/wiki/Tugela_Cache
104
+ - This looks promising =&gt; http://www.marcworrell.com/article-500-en.htmlhttp://www.marcworrell.com/article-500-en.html
105
+ - We could also store the keys in the ruby process or alternatively look in INVALIDATION-WITH-MEMCACHED
106
+ </pre>
107
+ <p>
108
+ We can&#8216;t support advanced selector with memcached backend
109
+ </p>
110
+ <p>
111
+ Configuring:
112
+ </p>
113
+ <pre>
114
+ config.cache do|c|
115
+ c.memcached do|mc|
116
+ mc.servers = ['localhost:11211']
117
+ mc.debug = false
118
+ mc.namespace = 'mesi'
119
+ mc.readonly = false
120
+ end
121
+ c.ttl = 600
122
+ end
123
+ </pre>
124
+
125
+ </div>
126
+
127
+
128
+ </div>
129
+
130
+ <div id="method-list">
131
+ <h3 class="section-bar">Methods</h3>
132
+
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;
143
+ </div>
144
+ </div>
145
+
146
+ </div>
147
+
148
+
149
+ <!-- if includes -->
150
+ <div id="includes">
151
+ <h3 class="section-bar">Included Modules</h3>
152
+
153
+ <div id="includes-list">
154
+ <span class="include-name"><a href="Log.html">ESI::Log</a></span>
155
+ </div>
156
+ </div>
157
+
158
+ <div id="section">
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+ <!-- if method_list -->
168
+ <div id="methods">
169
+ <h3 class="section-bar">Public Class methods</h3>
170
+
171
+ <div id="method-M000040" class="method-detail">
172
+ <a name="M000040"></a>
173
+
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;">
177
+ <span class="method-name">new</span><span class="method-args">( options )</span>
178
+ </a>
179
+ </div>
180
+
181
+ <div class="method-description">
182
+ </div>
183
+ </div>
184
+
185
+ <h3 class="section-bar">Public Instance methods</h3>
186
+
187
+ <div id="method-M000041" class="method-detail">
188
+ <a name="M000041"></a>
189
+
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;">
193
+ <span class="method-name">cached?</span><span class="method-args">( uri, params )</span>
194
+ </a>
195
+ </div>
196
+
197
+ <div class="method-description">
198
+ </div>
199
+ </div>
200
+
201
+ <div id="method-M000046" class="method-detail">
202
+ <a name="M000046"></a>
203
+
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;">
207
+ <span class="method-name">delete</span><span class="method-args">( key )</span>
208
+ </a>
209
+ </div>
210
+
211
+ <div class="method-description">
212
+ </div>
213
+ </div>
214
+
215
+ <div id="method-M000047" class="method-detail">
216
+ <a name="M000047"></a>
217
+
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;">
221
+ <span class="method-name">delete_unlocked</span><span class="method-args">( key )</span>
222
+ </a>
223
+ </div>
224
+
225
+ <div class="method-description">
226
+ </div>
227
+ </div>
228
+
229
+ <div id="method-M000042" class="method-detail">
230
+ <a name="M000042"></a>
231
+
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;">
235
+ <span class="method-name">get</span><span class="method-args">( uri, params )</span>
236
+ </a>
237
+ </div>
238
+
239
+ <div class="method-description">
240
+ </div>
241
+ </div>
242
+
243
+ <div id="method-M000045" class="method-detail">
244
+ <a name="M000045"></a>
245
+
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;">
249
+ <span class="method-name">keys</span><span class="method-args">(&amp;block)</span>
250
+ </a>
251
+ </div>
252
+
253
+ <div class="method-description">
254
+ </div>
255
+ </div>
256
+
257
+ <div id="method-M000043" class="method-detail">
258
+ <a name="M000043"></a>
259
+
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;">
263
+ <span class="method-name">put</span><span class="method-args">( uri, params, max_age, body )</span>
264
+ </a>
265
+ </div>
266
+
267
+ <div class="method-description">
268
+ </div>
269
+ </div>
270
+
271
+ <div id="method-M000044" class="method-detail">
272
+ <a name="M000044"></a>
273
+
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;">
277
+ <span class="method-name">sweep!</span><span class="method-args">()</span>
278
+ </a>
279
+ </div>
280
+
281
+ <div class="method-description">
282
+ <p>
283
+ run through the cache and dump anything that has expired
284
+ </p>
285
+ </div>
286
+ </div>
287
+
288
+ <div id="method-M000048" class="method-detail">
289
+ <a name="M000048"></a>
290
+
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;">
294
+ <span class="method-name">sweep_unlocked!</span><span class="method-args">()</span>
295
+ </a>
296
+ </div>
297
+
298
+ <div class="method-description">
299
+ </div>
300
+ </div>
301
+
302
+
303
+ </div>
304
+
305
+
306
+ </div>
307
+
308
+
309
+ <div id="validator-badges">
310
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
311
+ </div>
312
+
313
+ </body>
314
+ </html>