mongrel_esi 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README +10 -9
- data/doc/rdoc/classes/ESI/Cache.html +10 -10
- data/doc/rdoc/classes/ESI/Cache.src/{M000085.html → M000087.html} +0 -0
- data/doc/rdoc/classes/ESI/Cache.src/{M000086.html → M000088.html} +0 -0
- data/doc/rdoc/classes/ESI/Config.html +43 -62
- data/doc/rdoc/classes/ESI/Config.src/M000049.html +18 -0
- data/doc/rdoc/classes/ESI/Config.src/{M000059.html → M000050.html} +5 -5
- data/doc/rdoc/classes/ESI/Config.src/M000051.html +35 -0
- data/doc/rdoc/classes/ESI/Config.src/M000052.html +27 -5
- data/doc/rdoc/classes/ESI/Config.src/M000053.html +10 -5
- data/doc/rdoc/classes/ESI/Config.src/M000054.html +5 -22
- data/doc/rdoc/classes/ESI/Config.src/M000055.html +7 -25
- data/doc/rdoc/classes/ESI/Config.src/M000056.html +11 -10
- data/doc/rdoc/classes/ESI/Config/CacheConfig.html +25 -25
- data/doc/rdoc/classes/ESI/Config/CacheConfig.src/{M000068.html → M000060.html} +6 -5
- data/doc/rdoc/classes/ESI/Config/CacheConfig.src/{M000065.html → M000061.html} +5 -5
- data/doc/rdoc/classes/ESI/Config/CacheConfig.src/{M000066.html → M000062.html} +4 -4
- data/doc/rdoc/classes/ESI/Config/CacheConfig.src/{M000067.html → M000063.html} +4 -4
- data/doc/rdoc/classes/ESI/Config/CacheConfig.src/M000064.html +5 -6
- data/doc/rdoc/classes/ESI/Config/ConfigRouter.html +15 -15
- data/doc/rdoc/classes/ESI/Config/ConfigRouter.src/{M000061.html → M000057.html} +5 -5
- data/doc/rdoc/classes/ESI/Config/ConfigRouter.src/{M000062.html → M000058.html} +7 -7
- data/doc/rdoc/classes/ESI/Config/ConfigRouter.src/{M000063.html → M000059.html} +7 -7
- data/doc/rdoc/classes/ESI/Dispatcher.html +17 -15
- data/doc/rdoc/classes/ESI/Dispatcher.src/{M000087.html → M000092.html} +4 -7
- data/doc/rdoc/classes/ESI/Dispatcher.src/M000093.html +27 -0
- data/doc/rdoc/classes/ESI/Fragment.html +15 -15
- data/doc/rdoc/classes/ESI/Fragment.src/{M000100.html → M000111.html} +0 -0
- data/doc/rdoc/classes/ESI/Fragment.src/{M000101.html → M000112.html} +0 -0
- data/doc/rdoc/classes/ESI/Fragment.src/{M000102.html → M000113.html} +0 -0
- data/doc/rdoc/classes/ESI/MemcachedCache.html +46 -46
- data/doc/rdoc/classes/ESI/MemcachedCache.src/M000037.html +24 -0
- data/doc/rdoc/classes/ESI/MemcachedCache.src/M000038.html +22 -0
- data/doc/rdoc/classes/ESI/MemcachedCache.src/M000039.html +19 -0
- data/doc/rdoc/classes/ESI/MemcachedCache.src/M000040.html +10 -11
- data/doc/rdoc/classes/ESI/MemcachedCache.src/M000041.html +5 -9
- data/doc/rdoc/classes/ESI/MemcachedCache.src/M000042.html +6 -6
- data/doc/rdoc/classes/ESI/MemcachedCache.src/M000043.html +5 -10
- data/doc/rdoc/classes/ESI/MemcachedCache.src/M000044.html +5 -5
- data/doc/rdoc/classes/ESI/MemcachedCache.src/M000045.html +4 -6
- data/doc/rdoc/classes/ESI/OutputAdapter.html +204 -0
- data/doc/rdoc/classes/ESI/OutputAdapter.src/M000094.html +37 -0
- data/doc/rdoc/classes/ESI/OutputAdapter.src/M000095.html +18 -0
- data/doc/rdoc/classes/ESI/OutputAdapter.src/M000096.html +18 -0
- data/doc/rdoc/classes/ESI/OutputAdapter.src/M000097.html +18 -0
- data/doc/rdoc/classes/ESI/Parser.html +15 -15
- data/doc/rdoc/classes/ESI/Parser.src/{M000049.html → M000065.html} +0 -0
- data/doc/rdoc/classes/ESI/Parser.src/{M000050.html → M000066.html} +0 -0
- data/doc/rdoc/classes/ESI/Parser.src/{M000051.html → M000067.html} +0 -0
- data/doc/rdoc/classes/ESI/Processor.html +15 -15
- data/doc/rdoc/classes/ESI/Processor.src/{M000037.html → M000046.html} +0 -0
- data/doc/rdoc/classes/ESI/Processor.src/{M000038.html → M000047.html} +1 -1
- data/doc/rdoc/classes/ESI/Processor.src/{M000039.html → M000048.html} +0 -0
- data/doc/rdoc/classes/ESI/Proxy.html +48 -48
- data/doc/rdoc/classes/ESI/Proxy.src/M000071.html +7 -40
- data/doc/rdoc/classes/ESI/Proxy.src/M000072.html +50 -12
- data/doc/rdoc/classes/ESI/Proxy.src/M000073.html +49 -6
- data/doc/rdoc/classes/ESI/Proxy.src/M000074.html +11 -14
- data/doc/rdoc/classes/ESI/Proxy.src/M000075.html +6 -5
- data/doc/rdoc/classes/ESI/Proxy.src/M000076.html +9 -15
- data/doc/rdoc/classes/ESI/Proxy.src/M000077.html +5 -16
- data/doc/rdoc/classes/ESI/Proxy.src/M000078.html +28 -0
- data/doc/rdoc/classes/ESI/Proxy.src/M000079.html +29 -0
- data/doc/rdoc/classes/ESI/RackAdapter.html +214 -0
- data/doc/rdoc/classes/ESI/RackAdapter.src/M000068.html +18 -0
- data/doc/rdoc/classes/ESI/RackAdapter.src/M000069.html +34 -0
- data/doc/rdoc/classes/ESI/{MemcachedCache.src/M000048.html → RackAdapter.src/M000070.html} +4 -4
- data/doc/rdoc/classes/ESI/RackConfig.html +173 -0
- data/doc/rdoc/classes/ESI/RackConfig.src/M000089.html +28 -0
- data/doc/rdoc/classes/ESI/RackConfig.src/M000090.html +18 -0
- data/doc/rdoc/classes/ESI/RackConfig.src/M000091.html +20 -0
- data/doc/rdoc/classes/ESI/Request.html +158 -0
- data/doc/rdoc/classes/ESI/{MemcachedCache.src/M000046.html → Request.src/M000098.html} +5 -5
- data/doc/rdoc/classes/ESI/Request.src/M000099.html +18 -0
- data/doc/rdoc/classes/ESI/Response.html +36 -36
- data/doc/rdoc/classes/ESI/Response.src/M000080.html +10 -8
- data/doc/rdoc/classes/ESI/Response.src/M000081.html +5 -7
- data/doc/rdoc/classes/ESI/Response.src/M000082.html +8 -12
- data/doc/rdoc/classes/ESI/Response.src/M000083.html +7 -5
- data/doc/rdoc/classes/ESI/Response.src/M000084.html +12 -20
- data/doc/rdoc/classes/ESI/Response.src/{M000079.html → M000085.html} +5 -5
- data/doc/rdoc/classes/ESI/Response.src/M000086.html +33 -0
- data/doc/rdoc/classes/ESI/Router.html +10 -10
- data/doc/rdoc/classes/ESI/Router.src/{M000098.html → M000109.html} +0 -0
- data/doc/rdoc/classes/ESI/Router.src/{M000099.html → M000110.html} +0 -0
- data/doc/rdoc/classes/ESI/RubyCache.html +45 -45
- data/doc/rdoc/classes/ESI/RubyCache.src/{M000089.html → M000100.html} +6 -6
- data/doc/rdoc/classes/ESI/RubyCache.src/{M000090.html → M000101.html} +6 -6
- data/doc/rdoc/classes/ESI/RubyCache.src/{M000091.html → M000102.html} +6 -6
- data/doc/rdoc/classes/ESI/RubyCache.src/{M000092.html → M000103.html} +8 -8
- data/doc/rdoc/classes/ESI/RubyCache.src/{M000093.html → M000104.html} +4 -4
- data/doc/rdoc/classes/ESI/RubyCache.src/{M000094.html → M000105.html} +8 -8
- data/doc/rdoc/classes/ESI/RubyCache.src/{M000095.html → M000106.html} +4 -4
- data/doc/rdoc/classes/ESI/RubyCache.src/{M000096.html → M000107.html} +4 -4
- data/doc/rdoc/classes/ESI/RubyCache.src/{M000097.html → M000108.html} +4 -4
- data/doc/rdoc/classes/ESI/Tag.html +8 -8
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/COPYING.html +1 -1
- data/doc/rdoc/files/LICENSE.html +1 -1
- data/doc/rdoc/files/README.html +12 -10
- data/doc/rdoc/files/ext/esi/common_rl.html +1 -1
- data/doc/rdoc/files/ext/esi/esi_parser_c.html +1 -1
- data/doc/rdoc/files/ext/esi/parser_c.html +1 -1
- data/doc/rdoc/files/ext/esi/parser_h.html +1 -1
- data/doc/rdoc/files/ext/esi/parser_rl.html +122 -82
- data/doc/rdoc/files/ext/esi/test/test_c.html +1 -1
- data/doc/rdoc/files/lib/esi/cache_rb.html +2 -1
- data/doc/rdoc/files/lib/esi/config_rb.html +2 -1
- data/doc/rdoc/files/lib/esi/dispatcher_rb.html +3 -1
- data/doc/rdoc/files/lib/esi/invalidator_rb.html +1 -1
- data/doc/rdoc/files/lib/esi/logger_rb.html +1 -1
- data/doc/rdoc/files/lib/esi/parser_rb.html +1 -1
- data/doc/rdoc/files/lib/esi/processor_rb.html +1 -1
- data/doc/rdoc/files/lib/esi/proxy_rb.html +2 -2
- data/doc/rdoc/files/{ext/esi/test/parser_c.html → lib/esi/rack_adapter_rb.html} +21 -5
- data/doc/rdoc/files/lib/esi/response_rb.html +1 -1
- data/doc/rdoc/files/lib/esi/router_rb.html +1 -1
- data/doc/rdoc/files/lib/esi/tag/attempt_rb.html +1 -1
- data/doc/rdoc/files/lib/esi/tag/base_rb.html +1 -1
- data/doc/rdoc/files/lib/esi/tag/container_rb.html +1 -1
- data/doc/rdoc/files/lib/esi/tag/except_rb.html +1 -1
- data/doc/rdoc/files/lib/esi/tag/include_rb.html +1 -1
- data/doc/rdoc/files/lib/esi/tag/invalidate_rb.html +1 -1
- data/doc/rdoc/files/lib/esi/tag/try_rb.html +1 -1
- data/doc/rdoc/files/lib/esi/version_rb.html +1 -1
- data/doc/rdoc/files/lib/multi_dirhandler_rb.html +1 -1
- data/doc/rdoc/fr_class_index.html +4 -0
- data/doc/rdoc/fr_file_index.html +1 -5
- data/doc/rdoc/fr_method_index.html +87 -76
- data/ext/esi/esi_parser.c +2 -2
- data/ext/esi/parser.c +133 -107
- data/ext/esi/parser.h +9 -4
- data/ext/esi/parser.rl +99 -73
- data/ext/esi/test/test.c +11 -6
- data/lib/esi/cache.rb +7 -3
- data/lib/esi/config.rb +4 -8
- data/lib/esi/dispatcher.rb +14 -5
- data/lib/esi/processor.rb +1 -1
- data/lib/esi/proxy.rb +58 -48
- data/lib/esi/rack_adapter.rb +97 -0
- data/lib/esi/response.rb +30 -1
- data/lib/esi/version.rb +1 -1
- data/test/bench-plot.rb +31 -0
- data/test/benchmarks/csv-perf-serial0.4 +101 -0
- data/test/benchmarks/csv-perf-trunk +101 -0
- data/test/benchmarks/perf-serial0.4-n1000-c1.csv +101 -0
- data/test/benchmarks/perf-serial0.4-n1000-c2.csv +101 -0
- data/test/benchmarks/perf-serial0.4-n1000-c3.csv +101 -0
- data/test/benchmarks/perf-serial0.4-n1000-c4.csv +101 -0
- data/test/benchmarks/perf-serial0.4-n1000-c5.csv +101 -0
- data/test/benchmarks/perf-serial0.4-n1000-c6.csv +101 -0
- data/test/benchmarks/perf-serial0.4-n1000-c7.csv +101 -0
- data/test/benchmarks/perf-trunk-n1000-c1.csv +101 -0
- data/test/benchmarks/perf-trunk-n1000-c2.csv +101 -0
- data/test/benchmarks/perf-trunk-n1000-c3.csv +101 -0
- data/test/benchmarks/perf-trunk-n1000-c4.csv +101 -0
- data/test/benchmarks/perf-trunk-n1000-c5.csv +101 -0
- data/test/benchmarks/perf-trunk-n1000-c6.csv +101 -0
- data/test/benchmarks/perf-trunk-n1000-c7.csv +101 -0
- data/test/load_test.rb +5 -2
- data/test/load_test_ab.rb +9 -4
- metadata +261 -227
- data/doc/rdoc/classes/ESI/Config.src/M000057.html +0 -18
- data/doc/rdoc/classes/ESI/Config.src/M000058.html +0 -20
- data/doc/rdoc/classes/ESI/Config.src/M000060.html +0 -24
- data/doc/rdoc/classes/ESI/Dispatcher.src/M000088.html +0 -18
- data/doc/rdoc/classes/ESI/MemcachedCache.src/M000047.html +0 -18
- data/doc/rdoc/classes/ESI/Proxy.src/M000069.html +0 -20
- data/doc/rdoc/classes/ESI/Proxy.src/M000070.html +0 -55
- data/doc/rdoc/classes/ESI/Response.src/M000078.html +0 -23
- data/doc/rdoc/files/ext/esi/test/common_rl.html +0 -160
- data/doc/rdoc/files/ext/esi/test/parser_h.html +0 -101
- data/doc/rdoc/files/ext/esi/test/parser_rl.html +0 -827
- data/doc/rdoc/files/ext/esi/test/sp_c.html +0 -101
- data/ext/esi/test/common.rl +0 -46
- data/ext/esi/test/parser.c +0 -1875
- data/ext/esi/test/parser.h +0 -120
- data/ext/esi/test/parser.rl +0 -585
- 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
|
14
|
-
|
15
|
-
|
16
|
-
|
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">"REQUEST_URI"</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">></span> <span class="ruby-identifier">e</span>
|
22
|
+
26: <span class="ruby-identifier">log_error</span> <span class="ruby-node">"\n#{e.message}: error at #{e.backtrace.first} msg at #{__FILE__}:#{__LINE__}\n"</span>
|
23
|
+
27: <span class="ruby-keyword kw">ensure</span>
|
24
|
+
28: <span class="ruby-identifier">log_request</span> <span class="ruby-node">"\n#{url}, #{Time.now - start} seconds with status #{status} #{sent_from_cache ? "from cache" : ''} and #{chunk_count} chunks, #{bytes_sent} bytes\n"</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 <esi:include
|
|
92
92
|
<h3 class="section-bar">Methods</h3>
|
93
93
|
|
94
94
|
<div class="name-list">
|
95
|
-
<a href="#
|
96
|
-
<a href="#
|
97
|
-
<a href="#
|
95
|
+
<a href="#M000112">dup</a>
|
96
|
+
<a href="#M000111">new</a>
|
97
|
+
<a href="#M000113">valid?</a>
|
98
98
|
</div>
|
99
99
|
</div>
|
100
100
|
|
@@ -152,12 +152,12 @@ Represents part of the cached page, typically an <esi:include
|
|
152
152
|
<div id="methods">
|
153
153
|
<h3 class="section-bar">Public Class methods</h3>
|
154
154
|
|
155
|
-
<div id="method-
|
156
|
-
<a name="
|
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/
|
160
|
-
onclick="popupCode('Fragment.src/
|
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 <esi:include
|
|
168
168
|
|
169
169
|
<h3 class="section-bar">Public Instance methods</h3>
|
170
170
|
|
171
|
-
<div id="method-
|
172
|
-
<a name="
|
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/
|
176
|
-
onclick="popupCode('Fragment.src/
|
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-
|
189
|
-
<a name="
|
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/
|
193
|
-
onclick="popupCode('Fragment.src/
|
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>
|
File without changes
|
File without changes
|
File without changes
|
@@ -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‘s no good way to iterate over all the <a
|
94
|
-
href="MemcachedCache.html#
|
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
|
=> <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="#
|
135
|
-
<a href="#
|
136
|
-
<a href="#
|
137
|
-
<a href="#
|
138
|
-
<a href="#
|
139
|
-
<a href="#
|
140
|
-
<a href="#
|
141
|
-
<a href="#
|
142
|
-
<a href="#
|
134
|
+
<a href="#M000038">cached?</a>
|
135
|
+
<a href="#M000043">delete</a>
|
136
|
+
<a href="#M000044">delete_unlocked</a>
|
137
|
+
<a href="#M000039">get</a>
|
138
|
+
<a href="#M000042">keys</a>
|
139
|
+
<a href="#M000037">new</a>
|
140
|
+
<a href="#M000040">put</a>
|
141
|
+
<a href="#M000041">sweep!</a>
|
142
|
+
<a href="#M000045">sweep_unlocked!</a>
|
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-
|
172
|
-
<a name="
|
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/
|
176
|
-
onclick="popupCode('MemcachedCache.src/
|
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-
|
188
|
-
<a name="
|
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/
|
192
|
-
onclick="popupCode('MemcachedCache.src/
|
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-
|
202
|
-
<a name="
|
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/
|
206
|
-
onclick="popupCode('MemcachedCache.src/
|
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-
|
216
|
-
<a name="
|
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/
|
220
|
-
onclick="popupCode('MemcachedCache.src/
|
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-
|
230
|
-
<a name="
|
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/
|
234
|
-
onclick="popupCode('MemcachedCache.src/
|
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-
|
244
|
-
<a name="
|
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/
|
248
|
-
onclick="popupCode('MemcachedCache.src/
|
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">(&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-
|
258
|
-
<a name="
|
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/
|
262
|
-
onclick="popupCode('MemcachedCache.src/
|
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-
|
272
|
-
<a name="
|
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/
|
276
|
-
onclick="popupCode('MemcachedCache.src/
|
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-
|
289
|
-
<a name="
|
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/
|
293
|
-
onclick="popupCode('MemcachedCache.src/
|
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">></span> <span class="ruby-keyword kw">true</span> )
|
18
|
+
107: <span class="ruby-identifier">puts</span> <span class="ruby-node">"Using memcache with options => #{options.inspect}"</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">"Using memcache servers at #{options[:servers].inspect}"</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">></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">"error in #{__FILE__}:#{__LINE__}"</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>
|
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
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
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">></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">"error in #{__FILE__}:#{__LINE__}"</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>
|
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
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
112: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Object</span> =<span class="ruby-operator">></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">"error in #{__FILE__}:#{__LINE__}"</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>
|
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
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
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">&</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>
|