mongrel_esi 0.4.1 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (184) hide show
  1. data/Rakefile +15 -8
  2. data/bin/mongrel_esi +0 -0
  3. data/ext/esi/common.rl +32 -27
  4. data/ext/esi/esi_parser.c +11 -4
  5. data/ext/esi/parser.c +4536 -901
  6. data/ext/esi/parser.h +7 -0
  7. data/ext/esi/parser.rl +171 -53
  8. data/ext/esi/run-test.rb +0 -0
  9. data/ext/esi/test/common.rl +32 -27
  10. data/ext/esi/test/parser.c +322 -1342
  11. data/ext/esi/test/parser.h +7 -0
  12. data/ext/esi/test/parser.rl +171 -53
  13. data/ext/esi/test/test.c +13 -4
  14. data/ext/esi/test1.rb +35 -3
  15. data/lib/esi/cache.rb +2 -1
  16. data/lib/esi/config.rb +37 -0
  17. data/lib/esi/dispatcher.rb +3 -5
  18. data/lib/esi/invalidator.rb +3 -0
  19. data/lib/esi/logger.rb +0 -7
  20. data/lib/esi/parser.rb +70 -0
  21. data/lib/esi/processor.rb +88 -0
  22. data/lib/esi/proxy.rb +104 -0
  23. data/lib/esi/response.rb +106 -0
  24. data/lib/esi/router.rb +3 -0
  25. data/lib/esi/tag/attempt.rb +3 -0
  26. data/lib/esi/tag/base.rb +3 -1
  27. data/lib/esi/tag/except.rb +2 -0
  28. data/lib/esi/tag/include.rb +131 -132
  29. data/lib/esi/tag/invalidate.rb +2 -0
  30. data/lib/esi/tag/try.rb +3 -0
  31. data/test/integration/basic_test.rb +0 -1
  32. data/test/integration/docs/esi_max_age_varies.html +10 -0
  33. data/test/integration/handler_test.rb +31 -5
  34. data/test/integration/help.rb +13 -1
  35. data/test/load_test.rb +133 -0
  36. data/test/unit/include_request_test.rb +1 -1
  37. data/test/unit/parser_test.rb +41 -5
  38. data/test/unit/response_test.rb +184 -0
  39. metadata +50 -224
  40. data/doc/rdoc/classes/ESI/Cache.html +0 -178
  41. data/doc/rdoc/classes/ESI/Cache.src/M000060.html +0 -17
  42. data/doc/rdoc/classes/ESI/Cache.src/M000061.html +0 -20
  43. data/doc/rdoc/classes/ESI/Config/CacheConfig.html +0 -212
  44. data/doc/rdoc/classes/ESI/Config/CacheConfig.src/M000055.html +0 -19
  45. data/doc/rdoc/classes/ESI/Config/CacheConfig.src/M000056.html +0 -19
  46. data/doc/rdoc/classes/ESI/Config/CacheConfig.src/M000057.html +0 -18
  47. data/doc/rdoc/classes/ESI/Config/CacheConfig.src/M000058.html +0 -18
  48. data/doc/rdoc/classes/ESI/Config/CacheConfig.src/M000059.html +0 -18
  49. data/doc/rdoc/classes/ESI/Config/ConfigRouter.html +0 -187
  50. data/doc/rdoc/classes/ESI/Config/ConfigRouter.src/M000052.html +0 -19
  51. data/doc/rdoc/classes/ESI/Config/ConfigRouter.src/M000053.html +0 -21
  52. data/doc/rdoc/classes/ESI/Config/ConfigRouter.src/M000054.html +0 -21
  53. data/doc/rdoc/classes/ESI/Config.html +0 -291
  54. data/doc/rdoc/classes/ESI/Config.src/M000043.html +0 -18
  55. data/doc/rdoc/classes/ESI/Config.src/M000044.html +0 -18
  56. data/doc/rdoc/classes/ESI/Config.src/M000045.html +0 -35
  57. data/doc/rdoc/classes/ESI/Config.src/M000046.html +0 -38
  58. data/doc/rdoc/classes/ESI/Config.src/M000047.html +0 -23
  59. data/doc/rdoc/classes/ESI/Config.src/M000048.html +0 -18
  60. data/doc/rdoc/classes/ESI/Config.src/M000049.html +0 -20
  61. data/doc/rdoc/classes/ESI/Config.src/M000050.html +0 -18
  62. data/doc/rdoc/classes/ESI/Config.src/M000051.html +0 -24
  63. data/doc/rdoc/classes/ESI/Dispatcher.html +0 -172
  64. data/doc/rdoc/classes/ESI/Dispatcher.src/M000062.html +0 -23
  65. data/doc/rdoc/classes/ESI/Dispatcher.src/M000063.html +0 -20
  66. data/doc/rdoc/classes/ESI/Fragment.html +0 -218
  67. data/doc/rdoc/classes/ESI/Fragment.src/M000076.html +0 -21
  68. data/doc/rdoc/classes/ESI/Fragment.src/M000077.html +0 -18
  69. data/doc/rdoc/classes/ESI/Fragment.src/M000078.html +0 -18
  70. data/doc/rdoc/classes/ESI/Handler.html +0 -236
  71. data/doc/rdoc/classes/ESI/Handler.src/M000079.html +0 -19
  72. data/doc/rdoc/classes/ESI/Handler.src/M000080.html +0 -161
  73. data/doc/rdoc/classes/ESI/Handler.src/M000081.html +0 -24
  74. data/doc/rdoc/classes/ESI/Handler.src/M000082.html +0 -18
  75. data/doc/rdoc/classes/ESI/Handler.src/M000083.html +0 -26
  76. data/doc/rdoc/classes/ESI/Handler.src/M000084.html +0 -30
  77. data/doc/rdoc/classes/ESI/Invalidator.html +0 -131
  78. data/doc/rdoc/classes/ESI/Invalidator.src/M000004.html +0 -41
  79. data/doc/rdoc/classes/ESI/Log.html +0 -251
  80. data/doc/rdoc/classes/ESI/Log.src/M000005.html +0 -18
  81. data/doc/rdoc/classes/ESI/Log.src/M000006.html +0 -18
  82. data/doc/rdoc/classes/ESI/Log.src/M000007.html +0 -18
  83. data/doc/rdoc/classes/ESI/Log.src/M000008.html +0 -18
  84. data/doc/rdoc/classes/ESI/Log.src/M000009.html +0 -18
  85. data/doc/rdoc/classes/ESI/Log.src/M000010.html +0 -18
  86. data/doc/rdoc/classes/ESI/Log.src/M000011.html +0 -18
  87. data/doc/rdoc/classes/ESI/Log.src/M000012.html +0 -18
  88. data/doc/rdoc/classes/ESI/Log.src/M000013.html +0 -18
  89. data/doc/rdoc/classes/ESI/MemcachedCache.html +0 -314
  90. data/doc/rdoc/classes/ESI/MemcachedCache.src/M000034.html +0 -24
  91. data/doc/rdoc/classes/ESI/MemcachedCache.src/M000035.html +0 -22
  92. data/doc/rdoc/classes/ESI/MemcachedCache.src/M000036.html +0 -19
  93. data/doc/rdoc/classes/ESI/MemcachedCache.src/M000037.html +0 -23
  94. data/doc/rdoc/classes/ESI/MemcachedCache.src/M000038.html +0 -18
  95. data/doc/rdoc/classes/ESI/MemcachedCache.src/M000039.html +0 -19
  96. data/doc/rdoc/classes/ESI/MemcachedCache.src/M000040.html +0 -18
  97. data/doc/rdoc/classes/ESI/MemcachedCache.src/M000041.html +0 -18
  98. data/doc/rdoc/classes/ESI/MemcachedCache.src/M000042.html +0 -17
  99. data/doc/rdoc/classes/ESI/Router.html +0 -229
  100. data/doc/rdoc/classes/ESI/Router.src/M000073.html +0 -36
  101. data/doc/rdoc/classes/ESI/Router.src/M000074.html +0 -25
  102. data/doc/rdoc/classes/ESI/Router.src/M000075.html +0 -24
  103. data/doc/rdoc/classes/ESI/RubyCache.html +0 -278
  104. data/doc/rdoc/classes/ESI/RubyCache.src/M000064.html +0 -20
  105. data/doc/rdoc/classes/ESI/RubyCache.src/M000065.html +0 -22
  106. data/doc/rdoc/classes/ESI/RubyCache.src/M000066.html +0 -21
  107. data/doc/rdoc/classes/ESI/RubyCache.src/M000067.html +0 -22
  108. data/doc/rdoc/classes/ESI/RubyCache.src/M000068.html +0 -18
  109. data/doc/rdoc/classes/ESI/RubyCache.src/M000069.html +0 -22
  110. data/doc/rdoc/classes/ESI/RubyCache.src/M000070.html +0 -18
  111. data/doc/rdoc/classes/ESI/RubyCache.src/M000071.html +0 -18
  112. data/doc/rdoc/classes/ESI/RubyCache.src/M000072.html +0 -18
  113. data/doc/rdoc/classes/ESI/Tag/Attempt.html +0 -113
  114. data/doc/rdoc/classes/ESI/Tag/Base.html +0 -267
  115. data/doc/rdoc/classes/ESI/Tag/Base.src/M000028.html +0 -26
  116. data/doc/rdoc/classes/ESI/Tag/Base.src/M000029.html +0 -23
  117. data/doc/rdoc/classes/ESI/Tag/Base.src/M000030.html +0 -22
  118. data/doc/rdoc/classes/ESI/Tag/Base.src/M000031.html +0 -18
  119. data/doc/rdoc/classes/ESI/Tag/Base.src/M000032.html +0 -22
  120. data/doc/rdoc/classes/ESI/Tag/Base.src/M000033.html +0 -23
  121. data/doc/rdoc/classes/ESI/Tag/Except.html +0 -184
  122. data/doc/rdoc/classes/ESI/Tag/Except.src/M000020.html +0 -21
  123. data/doc/rdoc/classes/ESI/Tag/Except.src/M000021.html +0 -20
  124. data/doc/rdoc/classes/ESI/Tag/Except.src/M000022.html +0 -18
  125. data/doc/rdoc/classes/ESI/Tag/Include.html +0 -189
  126. data/doc/rdoc/classes/ESI/Tag/Include.src/M000017.html +0 -20
  127. data/doc/rdoc/classes/ESI/Tag/Include.src/M000018.html +0 -18
  128. data/doc/rdoc/classes/ESI/Tag/Include.src/M000019.html +0 -125
  129. data/doc/rdoc/classes/ESI/Tag/IncludeRequest/Error.html +0 -155
  130. data/doc/rdoc/classes/ESI/Tag/IncludeRequest/Error.src/M000016.html +0 -19
  131. data/doc/rdoc/classes/ESI/Tag/IncludeRequest.html +0 -199
  132. data/doc/rdoc/classes/ESI/Tag/IncludeRequest.src/M000014.html +0 -18
  133. data/doc/rdoc/classes/ESI/Tag/IncludeRequest.src/M000015.html +0 -42
  134. data/doc/rdoc/classes/ESI/Tag/Invalidate.html +0 -171
  135. data/doc/rdoc/classes/ESI/Tag/Invalidate.src/M000025.html +0 -19
  136. data/doc/rdoc/classes/ESI/Tag/Invalidate.src/M000026.html +0 -51
  137. data/doc/rdoc/classes/ESI/Tag/Invalidate.src/M000027.html +0 -19
  138. data/doc/rdoc/classes/ESI/Tag/Try.html +0 -161
  139. data/doc/rdoc/classes/ESI/Tag/Try.src/M000023.html +0 -40
  140. data/doc/rdoc/classes/ESI/Tag/Try.src/M000024.html +0 -18
  141. data/doc/rdoc/classes/ESI/Tag.html +0 -137
  142. data/doc/rdoc/classes/ESI.html +0 -169
  143. data/doc/rdoc/classes/MultiDirHandler.html +0 -198
  144. data/doc/rdoc/classes/MultiDirHandler.src/M000001.html +0 -20
  145. data/doc/rdoc/classes/MultiDirHandler.src/M000002.html +0 -28
  146. data/doc/rdoc/classes/MultiDirHandler.src/M000003.html +0 -22
  147. data/doc/rdoc/classes/Net/An/HTTP.html +0 -137
  148. data/doc/rdoc/classes/Net/An/HTTP.src/M000087.html +0 -17
  149. data/doc/rdoc/classes/Net/An/IORequest.html +0 -139
  150. data/doc/rdoc/classes/Net/An/IORequest.src/M000088.html +0 -17
  151. data/doc/rdoc/classes/Net/An/IOResponse.html +0 -139
  152. data/doc/rdoc/classes/Net/An/IOResponse.src/M000085.html +0 -17
  153. data/doc/rdoc/classes/Net/An/IOSocket.html +0 -137
  154. data/doc/rdoc/classes/Net/An/IOSocket.src/M000086.html +0 -17
  155. data/doc/rdoc/classes/Net/An.html +0 -114
  156. data/doc/rdoc/classes/Net.html +0 -119
  157. data/doc/rdoc/created.rid +0 -1
  158. data/doc/rdoc/files/COPYING.html +0 -168
  159. data/doc/rdoc/files/LICENSE.html +0 -605
  160. data/doc/rdoc/files/README.html +0 -361
  161. data/doc/rdoc/files/lib/esi/cache_rb.html +0 -113
  162. data/doc/rdoc/files/lib/esi/config_rb.html +0 -108
  163. data/doc/rdoc/files/lib/esi/dispatcher_rb.html +0 -109
  164. data/doc/rdoc/files/lib/esi/handler_rb.html +0 -121
  165. data/doc/rdoc/files/lib/esi/invalidator_rb.html +0 -117
  166. data/doc/rdoc/files/lib/esi/logger_rb.html +0 -108
  167. data/doc/rdoc/files/lib/esi/router_rb.html +0 -101
  168. data/doc/rdoc/files/lib/esi/tag/attempt_rb.html +0 -101
  169. data/doc/rdoc/files/lib/esi/tag/base_rb.html +0 -108
  170. data/doc/rdoc/files/lib/esi/tag/except_rb.html +0 -101
  171. data/doc/rdoc/files/lib/esi/tag/include_rb.html +0 -109
  172. data/doc/rdoc/files/lib/esi/tag/invalidate_rb.html +0 -109
  173. data/doc/rdoc/files/lib/esi/tag/try_rb.html +0 -108
  174. data/doc/rdoc/files/lib/multi_dirhandler_rb.html +0 -109
  175. data/doc/rdoc/files/lib/net/ahttp_rb.html +0 -109
  176. data/doc/rdoc/fr_class_index.html +0 -55
  177. data/doc/rdoc/fr_file_index.html +0 -44
  178. data/doc/rdoc/fr_method_index.html +0 -114
  179. data/doc/rdoc/index.html +0 -24
  180. data/doc/rdoc/rdoc-style.css +0 -208
  181. data/ext/esi/parser.rb +0 -49
  182. data/ext/esi/ruby_esi.rl +0 -135
  183. data/lib/esi/handler.rb +0 -221
  184. data/lib/net/ahttp.rb +0 -36
@@ -1,361 +0,0 @@
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>File: README</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="fileHeader">
50
- <h1>README</h1>
51
- <table class="header-table">
52
- <tr class="top-aligned-row">
53
- <td><strong>Path:</strong></td>
54
- <td>README
55
- </td>
56
- </tr>
57
- <tr class="top-aligned-row">
58
- <td><strong>Last Update:</strong></td>
59
- <td>Sat Jan 05 23:15:10 -0500 2008</td>
60
- </tr>
61
- </table>
62
- </div>
63
- <!-- banner header -->
64
-
65
- <div id="bodyContent">
66
-
67
-
68
-
69
- <div id="contextContent">
70
-
71
- <div id="description">
72
- <h1>About</h1>
73
- <p>
74
- MongrelESI is meant to make caching easier by distributing the cache logic.
75
- </p>
76
- <p>
77
- The idea is to represent each part of the page as a unique URL.
78
- </p>
79
- <p>
80
- The whole page may not be cachable, but most of it probably is. The cache
81
- server works by scanning the requested document for specific &lt;esi:* tags
82
- before servering the response. MongrelESI currently, only supports a few
83
- basic instructions
84
- </p>
85
- <h1>Tags</h1>
86
- <p>
87
- esi:include:
88
- </p>
89
- <pre>
90
- src - request path, response replaces esi:include tag
91
- timeout - how long to wait on the response
92
- max-age - how long to cache the entity
93
- onerror - whether continue on errors or trigger an exception
94
- </pre>
95
- <p>
96
- esi:invalidate:
97
- </p>
98
- <pre>
99
- encloses invalidation instructions.
100
- these instructions currently only support basic invalidation
101
- e.g.
102
- &lt;esi:invalidate output=&quot;no&quot;&gt;
103
- &lt;?xml version=&quot;1.0&quot;?&gt;
104
- &lt;!DOCTYPE INVALIDATION SYSTEM &quot;internal:///WCSinvalidation.dtd&quot;&gt;
105
- &lt;INVALIDATION VERSION=&quot;WCS-1.1&quot;&gt;
106
- &lt;OBJECT&gt;
107
- &lt;BASICSELECTOR URI=&quot;/path/to/invalidate&quot;/&gt;
108
- &lt;ACTION REMOVALTTL=&quot;0&quot;/&gt;
109
- &lt;INFO VALUE=&quot;invalidating fragment test 1&quot;/&gt;
110
- &lt;/OBJECT&gt;
111
- &lt;/INVALIDATION&gt;
112
- &lt;/esi:invalidate&gt;
113
-
114
- In the above example, only /path/to/invalidate will be invalidated, advanced regex style selectors are only support with ruby as the
115
- cache storage.
116
- </pre>
117
- <p>
118
- esi:try/esi:attempt/esi:except
119
- </p>
120
- <pre>
121
- if any tags within the attempt block raise an exception and the onerror attribute is not equal to continue then
122
- the server will fall back to the markup within the except block
123
- </pre>
124
- <h1>Proxy Config</h1>
125
- <p>
126
- MongrelESI is a proxy server. To configure where requests should be proxied
127
- modify the config/routes.yml file.
128
- </p>
129
- <p>
130
- Here&#8216;s an example:
131
- </p>
132
- <p>
133
- ESI::Config.define(listeners) do|config|
134
- </p>
135
- <pre>
136
- # define request path routing rules
137
- config.routes do|s|
138
- s.match( /^\/(content|samples|extras).*/ ) do|r|
139
- r.servers = ['127.0.0.1:4000']
140
- end
141
- s.default do|r|
142
- r.servers = ['127.0.0.1:3000']
143
- end
144
- end
145
- </pre>
146
- <p>
147
- end
148
- </p>
149
- <p>
150
- This sample configuration will route all urls starting with /content,
151
- /samples, or /extras to the servers running at 127.0.0.1 on port 4000.
152
- Everything else that matches the .* will be routed to the server running on
153
- port 3000. Optionally the caching duration can be specificied explicity for
154
- each host
155
- </p>
156
- <p>
157
- s.default do|r|
158
- </p>
159
- <pre>
160
- r.servers = ['127.0.0.1:3000']
161
- r.cache_ttl = 300
162
- </pre>
163
- <p>
164
- end
165
- </p>
166
- <p>
167
- This example will cache all requests for 300 seconds, but normally you
168
- would want to set the ttl on each individual fragment or include.
169
- </p>
170
- <p>
171
- A typical include would look like the following:
172
- </p>
173
- <p>
174
- &lt;esi:include src=&quot;/content/1&quot; max-age=&quot;600+600&quot;/&gt;
175
- </p>
176
- <p>
177
- Requesting /home, might respond with the following:
178
- </p>
179
- <p>
180
- &lt;html&gt; &lt;head&gt;&lt;title&gt;Your Page&lt;/title&gt; &lt;/head&gt;
181
- &lt;body&gt; &lt;div class=&quot;header&quot;&gt;&lt;esi:include
182
- src=&quot;/content/1 max-age=&quot;600+600&quot;/&gt;&lt;/div&gt;
183
- &lt;div&gt;Some content&lt;/div&gt; &lt;div&gt;Some more
184
- content&lt;/div&gt; &lt;/body&gt; &lt;/html&gt;
185
- </p>
186
- <p>
187
- If the uri is not already cached, the cache server will request /content/1,
188
- which will respond with:
189
- </p>
190
- <p>
191
- &lt;div&gt;hello User42&lt;/div&gt;
192
- </p>
193
- <p>
194
- And finally, MongrelESI will respond to the original client request with
195
- the combined documents: &lt;html&gt; &lt;head&gt;&lt;title&gt;Your
196
- Page&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;div
197
- class=&quot;header&quot;&gt;&lt;div&gt;hello User42&lt;/div&gt;&lt;/div&gt;
198
- &lt;div&gt;Some content&lt;/div&gt; &lt;div&gt;Some more
199
- content&lt;/div&gt; &lt;/body&gt; &lt;/html&gt;
200
- </p>
201
- <h2>Integrating with your applications</h2>
202
- <p>
203
- MongrelESI was built to support integrating lots of applications together.
204
- </p>
205
- <p>
206
- Primarily, you&#8216;ll want to integrate by having one base application
207
- and many tiny applications that surface within your primary application. In
208
- the rails sense think components. In a bigger sense think multiple
209
- application technologies all integrating into the same application. Imagine
210
- a java application returning up to the minute chat conversations in one
211
- part of the page, while rails delivers a reliable listing of current forum
212
- discussion, and maybe a python presense indicator for forum posts&#8230;
213
- </p>
214
- <p>
215
- One thing to keep in mind is mongrel esi is a proxy server. This means for
216
- each request it needs to know where to route the requests. To support this
217
- config.rb can express any regex to match a url and determine where a
218
- request should be forwarded as well as defining a default route.
219
- </p>
220
- <p>
221
- It is also sometimes convenient to allow multiple applications to store or
222
- house static content. For this to work mongrel esi needs to know in what
223
- directories to search for static files. This can be done by using the <a
224
- href="../classes/MultiDirHandler.html">MultiDirHandler</a> (see
225
- rev-config.rb)
226
- </p>
227
- <h2>Supported Features of <a href="../classes/ESI.html">ESI</a></h2>
228
- <p>
229
- From [<a href="http://www.w3.org/TR/esi-lang">www.w3.org/TR/esi-lang</a>
230
- esi-lang]
231
- </p>
232
- <p>
233
- MongrelESI supports basic include, exception handling and invalidation. It
234
- does not include support for Variable or Conditional processing. It does
235
- have suppport for COOKIE variables. (e.g. $(HTTP_COOKIE{name}) will be
236
- replaced with the value of the cookie, name)
237
- </p>
238
- <p>
239
- + Inclusion - <a href="../classes/ESI.html">ESI</a> can compose pages by
240
- assembling included content, which is fetched from the network.
241
- </p>
242
- <pre>
243
- This allows each such fragment to have its own metadata (e.g., cacheability and handling information) seperately associated.
244
- </pre>
245
- <ul>
246
- <li>Variable support - <a href="../classes/ESI.html">ESI</a> 1.0 supports the
247
- use of variables based on HTTP request attributes in a manner
248
-
249
- <pre>
250
- reminiscent of the Common Gateway Interface. These variables can be used by ESI statements or written directly into the processed markup.
251
- </pre>
252
- </li>
253
- <li>Conditional processing - <a href="../classes/ESI.html">ESI</a> allows
254
- conditional logic with Boolean comparisons to be used to influence how a
255
- template is processed.
256
-
257
- </li>
258
- </ul>
259
- <p>
260
- + Exception and error handling - <a href="../classes/ESI.html">ESI</a>
261
- provides for specification of alternate and default resources in a number
262
- of situations.
263
- </p>
264
- <h2>HTTP Readings</h2>
265
- <ul>
266
- <li><a
267
- href="http://www.jmarshall.com/easy/http">www.jmarshall.com/easy/http</a>/
268
-
269
- </li>
270
- </ul>
271
- <h2>Adding New Features and Bug Fixing</h2>
272
- <p>
273
- Before adding a new feature or bug fix, it&#8216;s important to add a test
274
- to verify the behavior.
275
- </p>
276
- <p>
277
- Also, help out by keeping the Changelog updated with new features and major
278
- bug fixes
279
- </p>
280
- <h2>Future ideas of improving integration</h2>
281
- <p>
282
- NOTE: this is a work in progress, below is how I&#8216;d like to integrate
283
- with rails in the future
284
- </p>
285
- <p>
286
- cd to/path/to/your/primary/rails/app
287
- </p>
288
- <p>
289
- mongrel_esi add . &#8212;default mongrel_esi add
290
- path/to/your/rails/secondary_app2 mongrel_esi add
291
- path/to/your/rails/secondary_app3 mongrel_esi add
292
- path/to/your/rails/secondary_app4
293
- </p>
294
- <p>
295
- mongrel_esi start
296
- </p>
297
- <pre>
298
- - starts up mongrel in each of the applications
299
- </pre>
300
- <h2>Credits ==</h2>
301
- <p>
302
- Support:
303
- </p>
304
- <pre>
305
- Zed A. Shaw -- For writing [http://mongrel.rubyforge.org/ mongrel]
306
- Adrian D. Thurston -- For writing [http://www.cs.queensu.ca/~thurston/ragel/ ragel]
307
-
308
- The [http://www.ruby-lang.org/ ruby] community, for all their insights and help
309
- </pre>
310
- <p>
311
- Author:
312
- </p>
313
- <pre>
314
- Todd Fisher
315
- </pre>
316
- <p>
317
- Co-Authors:
318
- </p>
319
- <pre>
320
- Aaron Batalion -- Design ideas and integrating with Rails, fragment_fu. Ragel advocate
321
- Richard Kilmer -- Thread saftey dispatcher, production ready
322
- Adam Bair -- Writing the initial testing framework and logger.
323
- Jeff Damick -- Writing the initial configuration.
324
- </pre>
325
- <p>
326
- And of course thanks to everyone in ruby-lang for putting up with my
327
- questions MenTaLguY for the great help in making good use of ruby
328
- </p>
329
-
330
- </div>
331
-
332
-
333
- </div>
334
-
335
-
336
- </div>
337
-
338
-
339
- <!-- if includes -->
340
-
341
- <div id="section">
342
-
343
-
344
-
345
-
346
-
347
-
348
-
349
-
350
- <!-- if method_list -->
351
-
352
-
353
- </div>
354
-
355
-
356
- <div id="validator-badges">
357
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
358
- </div>
359
-
360
- </body>
361
- </html>
@@ -1,113 +0,0 @@
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>File: cache.rb</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="fileHeader">
50
- <h1>cache.rb</h1>
51
- <table class="header-table">
52
- <tr class="top-aligned-row">
53
- <td><strong>Path:</strong></td>
54
- <td>lib/esi/cache.rb
55
- </td>
56
- </tr>
57
- <tr class="top-aligned-row">
58
- <td><strong>Last Update:</strong></td>
59
- <td>Sat Jan 05 23:36:52 -0500 2008</td>
60
- </tr>
61
- </table>
62
- </div>
63
- <!-- banner header -->
64
-
65
- <div id="bodyContent">
66
-
67
-
68
-
69
- <div id="contextContent">
70
-
71
-
72
- <div id="requires-list">
73
- <h3 class="section-bar">Required files</h3>
74
-
75
- <div class="name-list">
76
- digest/sha1&nbsp;&nbsp;
77
- thread&nbsp;&nbsp;
78
- ostruct&nbsp;&nbsp;
79
- esi/logger&nbsp;&nbsp;
80
- rubygems&nbsp;&nbsp;
81
- memcache&nbsp;&nbsp;
82
- </div>
83
- </div>
84
-
85
- </div>
86
-
87
-
88
- </div>
89
-
90
-
91
- <!-- if includes -->
92
-
93
- <div id="section">
94
-
95
-
96
-
97
-
98
-
99
-
100
-
101
-
102
- <!-- if method_list -->
103
-
104
-
105
- </div>
106
-
107
-
108
- <div id="validator-badges">
109
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
110
- </div>
111
-
112
- </body>
113
- </html>