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
@@ -5,21 +5,17 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>partial_buffer (ESI::Response)</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/response.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
45: <span class="ruby-ivar">@output</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">read</span>
|
21
|
-
46: <span class="ruby-ivar">@last_out</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
22
|
-
47: <span class="ruby-keyword kw">end</span>
|
23
|
-
48: <span class="ruby-keyword kw">end</span></pre>
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/esi/response.rb, line 54</span>
|
14
|
+
54: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">partial_buffer</span>
|
15
|
+
55: <span class="ruby-ivar">@active_buffer</span>.<span class="ruby-identifier">close_write</span>
|
16
|
+
56: <span class="ruby-identifier">temp</span> = <span class="ruby-identifier">reserve_buffer</span>
|
17
|
+
57: <span class="ruby-ivar">@active_buffer</span> = <span class="ruby-identifier">reserve_buffer</span>
|
18
|
+
58: <span class="ruby-identifier">temp</span>
|
19
|
+
59: <span class="ruby-keyword kw">end</span></pre>
|
24
20
|
</body>
|
25
21
|
</html>
|
@@ -5,14 +5,16 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>reserve_buffer (ESI::Response)</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/response.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/esi/response.rb, line 62</span>
|
14
|
+
62: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reserve_buffer</span>
|
15
|
+
63: <span class="ruby-identifier">buffer</span> = <span class="ruby-ivar">@back_buffer</span>[<span class="ruby-ivar">@count</span>] = <span class="ruby-constant">StringIO</span>.<span class="ruby-identifier">new</span>
|
16
|
+
64: <span class="ruby-ivar">@count</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
17
|
+
65: <span class="ruby-identifier">buffer</span>
|
18
|
+
66: <span class="ruby-keyword kw">end</span></pre>
|
17
19
|
</body>
|
18
20
|
</html>
|
@@ -5,29 +5,21 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>send (ESI::Response)</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/response.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
64: <span class="ruby-identifier">o</span>.<span class="ruby-identifier">rewind</span>
|
25
|
-
65: <span class="ruby-identifier">buf</span> = <span class="ruby-identifier">o</span>.<span class="ruby-identifier">read</span>
|
26
|
-
66: <span class="ruby-comment cmt">#puts "flush : #{buf.inspect}"</span>
|
27
|
-
67: <span class="ruby-ivar">@output</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">buf</span>
|
28
|
-
68: <span class="ruby-keyword kw">end</span>
|
29
|
-
69: <span class="ruby-comment cmt">#puts "#{self} sending: #{@count-tail_buffer.size}"</span>
|
30
|
-
70: <span class="ruby-keyword kw">end</span>
|
31
|
-
71: <span class="ruby-keyword kw">end</span></pre>
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/esi/response.rb, line 68</span>
|
14
|
+
68: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">send</span>
|
15
|
+
69: <span class="ruby-identifier">check_buffers</span> = <span class="ruby-ivar">@back_buffer</span>[<span class="ruby-ivar">@last_out</span><span class="ruby-operator">..</span><span class="ruby-ivar">@count</span>]
|
16
|
+
70:
|
17
|
+
71: <span class="ruby-keyword kw">for</span> <span class="ruby-identifier">buffer</span> <span class="ruby-keyword kw">in</span> <span class="ruby-identifier">check_buffers</span> <span class="ruby-keyword kw">do</span>
|
18
|
+
72: <span class="ruby-keyword kw">break</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword kw">or</span> <span class="ruby-operator">!</span><span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">closed_write?</span>
|
19
|
+
73: <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">rewind</span>
|
20
|
+
74: <span class="ruby-ivar">@output</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">read</span>
|
21
|
+
75: <span class="ruby-ivar">@last_out</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
22
|
+
76: <span class="ruby-keyword kw">end</span>
|
23
|
+
77: <span class="ruby-keyword kw">end</span></pre>
|
32
24
|
</body>
|
33
25
|
</html>
|
@@ -5,14 +5,14 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>wait_thread (ESI::Response)</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/response.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/esi/response.rb, line 79</span>
|
14
|
+
79: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">wait_thread</span>(<span class="ruby-identifier">thread</span>)
|
15
|
+
80: <span class="ruby-ivar">@threads</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">thread</span>
|
16
|
+
81: <span class="ruby-keyword kw">end</span></pre>
|
17
17
|
</body>
|
18
18
|
</html>
|
@@ -0,0 +1,33 @@
|
|
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>flush (ESI::Response)</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/response.rb, line 83</span>
|
14
|
+
83: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">flush</span>
|
15
|
+
84: <span class="ruby-ivar">@threads</span>.<span class="ruby-identifier">each</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">t</span><span class="ruby-operator">|</span> <span class="ruby-identifier">t</span>.<span class="ruby-identifier">join</span> }
|
16
|
+
85: <span class="ruby-ivar">@active_buffer</span>.<span class="ruby-identifier">close_write</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-ivar">@active_buffer</span>.<span class="ruby-identifier">closed_write?</span>
|
17
|
+
86: <span class="ruby-comment cmt"># roll up requests</span>
|
18
|
+
87: <span class="ruby-ivar">@last_out</span> = <span class="ruby-value">0</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@last_out</span> <span class="ruby-operator">==</span> <span class="ruby-value">-1</span>
|
19
|
+
88: <span class="ruby-identifier">tail_buffer</span> = (<span class="ruby-ivar">@back_buffer</span>[<span class="ruby-ivar">@last_out</span><span class="ruby-operator">..</span><span class="ruby-ivar">@back_buffer</span>.<span class="ruby-identifier">size</span>]<span class="ruby-operator">||</span>[])
|
20
|
+
89: <span class="ruby-comment cmt">#puts "\nflushing: #{tail_buffer.inspect} from #{@back_buffer.inspect}"</span>
|
21
|
+
90: <span class="ruby-keyword kw">while</span> <span class="ruby-operator">!</span><span class="ruby-identifier">tail_buffer</span>.<span class="ruby-identifier">empty?</span>
|
22
|
+
91: <span class="ruby-identifier">o</span> = <span class="ruby-identifier">tail_buffer</span>.<span class="ruby-identifier">shift</span>
|
23
|
+
92: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">o</span>.<span class="ruby-identifier">nil?</span>
|
24
|
+
93: <span class="ruby-identifier">o</span>.<span class="ruby-identifier">rewind</span>
|
25
|
+
94: <span class="ruby-identifier">buf</span> = <span class="ruby-identifier">o</span>.<span class="ruby-identifier">read</span>
|
26
|
+
95: <span class="ruby-comment cmt">#puts "flush : #{buf.inspect}"</span>
|
27
|
+
96: <span class="ruby-ivar">@output</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">buf</span>
|
28
|
+
97: <span class="ruby-keyword kw">end</span>
|
29
|
+
98: <span class="ruby-comment cmt">#puts "#{self} sending: #{@count-tail_buffer.size}"</span>
|
30
|
+
99: <span class="ruby-keyword kw">end</span>
|
31
|
+
100: <span class="ruby-keyword kw">end</span></pre>
|
32
|
+
</body>
|
33
|
+
</html>
|
@@ -138,8 +138,8 @@ or from memory
|
|
138
138
|
<h3 class="section-bar">Methods</h3>
|
139
139
|
|
140
140
|
<div class="name-list">
|
141
|
-
<a href="#
|
142
|
-
<a href="#
|
141
|
+
<a href="#M000109">new</a>
|
142
|
+
<a href="#M000110">url_for</a>
|
143
143
|
</div>
|
144
144
|
</div>
|
145
145
|
|
@@ -161,12 +161,12 @@ or from memory
|
|
161
161
|
<div id="methods">
|
162
162
|
<h3 class="section-bar">Public Class methods</h3>
|
163
163
|
|
164
|
-
<div id="method-
|
165
|
-
<a name="
|
164
|
+
<div id="method-M000109" class="method-detail">
|
165
|
+
<a name="M000109"></a>
|
166
166
|
|
167
167
|
<div class="method-heading">
|
168
|
-
<a href="Router.src/
|
169
|
-
onclick="popupCode('Router.src/
|
168
|
+
<a href="Router.src/M000109.html" target="Code" class="method-signature"
|
169
|
+
onclick="popupCode('Router.src/M000109.html');return false;">
|
170
170
|
<span class="method-name">new</span><span class="method-args">( routes )</span>
|
171
171
|
</a>
|
172
172
|
</div>
|
@@ -180,12 +180,12 @@ config is a routing table as defined above
|
|
180
180
|
|
181
181
|
<h3 class="section-bar">Public Instance methods</h3>
|
182
182
|
|
183
|
-
<div id="method-
|
184
|
-
<a name="
|
183
|
+
<div id="method-M000110" class="method-detail">
|
184
|
+
<a name="M000110"></a>
|
185
185
|
|
186
186
|
<div class="method-heading">
|
187
|
-
<a href="Router.src/
|
188
|
-
onclick="popupCode('Router.src/
|
187
|
+
<a href="Router.src/M000110.html" target="Code" class="method-signature"
|
188
|
+
onclick="popupCode('Router.src/M000110.html');return false;">
|
189
189
|
<span class="method-name">url_for</span><span class="method-args">( request_uri )</span>
|
190
190
|
</a>
|
191
191
|
</div>
|
File without changes
|
File without changes
|
@@ -102,15 +102,15 @@ Default cache.
|
|
102
102
|
<h3 class="section-bar">Methods</h3>
|
103
103
|
|
104
104
|
<div class="name-list">
|
105
|
-
<a href="#
|
106
|
-
<a href="#
|
107
|
-
<a href="#
|
108
|
-
<a href="#
|
109
|
-
<a href="#
|
110
|
-
<a href="#
|
111
|
-
<a href="#
|
112
|
-
<a href="#
|
113
|
-
<a href="#
|
105
|
+
<a href="#M000101">cached?</a>
|
106
|
+
<a href="#M000106">delete</a>
|
107
|
+
<a href="#M000107">delete_unlocked</a>
|
108
|
+
<a href="#M000102">get</a>
|
109
|
+
<a href="#M000105">keys</a>
|
110
|
+
<a href="#M000100">new</a>
|
111
|
+
<a href="#M000103">put</a>
|
112
|
+
<a href="#M000104">sweep!</a>
|
113
|
+
<a href="#M000108">sweep_unlocked!</a>
|
114
114
|
</div>
|
115
115
|
</div>
|
116
116
|
|
@@ -132,12 +132,12 @@ Default cache.
|
|
132
132
|
<div id="methods">
|
133
133
|
<h3 class="section-bar">Public Class methods</h3>
|
134
134
|
|
135
|
-
<div id="method-
|
136
|
-
<a name="
|
135
|
+
<div id="method-M000100" class="method-detail">
|
136
|
+
<a name="M000100"></a>
|
137
137
|
|
138
138
|
<div class="method-heading">
|
139
|
-
<a href="RubyCache.src/
|
140
|
-
onclick="popupCode('RubyCache.src/
|
139
|
+
<a href="RubyCache.src/M000100.html" target="Code" class="method-signature"
|
140
|
+
onclick="popupCode('RubyCache.src/M000100.html');return false;">
|
141
141
|
<span class="method-name">new</span><span class="method-args">( options = {} )</span>
|
142
142
|
</a>
|
143
143
|
</div>
|
@@ -148,12 +148,12 @@ Default cache.
|
|
148
148
|
|
149
149
|
<h3 class="section-bar">Public Instance methods</h3>
|
150
150
|
|
151
|
-
<div id="method-
|
152
|
-
<a name="
|
151
|
+
<div id="method-M000101" class="method-detail">
|
152
|
+
<a name="M000101"></a>
|
153
153
|
|
154
154
|
<div class="method-heading">
|
155
|
-
<a href="RubyCache.src/
|
156
|
-
onclick="popupCode('RubyCache.src/
|
155
|
+
<a href="RubyCache.src/M000101.html" target="Code" class="method-signature"
|
156
|
+
onclick="popupCode('RubyCache.src/M000101.html');return false;">
|
157
157
|
<span class="method-name">cached?</span><span class="method-args">( uri, params )</span>
|
158
158
|
</a>
|
159
159
|
</div>
|
@@ -162,12 +162,12 @@ Default cache.
|
|
162
162
|
</div>
|
163
163
|
</div>
|
164
164
|
|
165
|
-
<div id="method-
|
166
|
-
<a name="
|
165
|
+
<div id="method-M000106" class="method-detail">
|
166
|
+
<a name="M000106"></a>
|
167
167
|
|
168
168
|
<div class="method-heading">
|
169
|
-
<a href="RubyCache.src/
|
170
|
-
onclick="popupCode('RubyCache.src/
|
169
|
+
<a href="RubyCache.src/M000106.html" target="Code" class="method-signature"
|
170
|
+
onclick="popupCode('RubyCache.src/M000106.html');return false;">
|
171
171
|
<span class="method-name">delete</span><span class="method-args">( key )</span>
|
172
172
|
</a>
|
173
173
|
</div>
|
@@ -176,12 +176,12 @@ Default cache.
|
|
176
176
|
</div>
|
177
177
|
</div>
|
178
178
|
|
179
|
-
<div id="method-
|
180
|
-
<a name="
|
179
|
+
<div id="method-M000107" class="method-detail">
|
180
|
+
<a name="M000107"></a>
|
181
181
|
|
182
182
|
<div class="method-heading">
|
183
|
-
<a href="RubyCache.src/
|
184
|
-
onclick="popupCode('RubyCache.src/
|
183
|
+
<a href="RubyCache.src/M000107.html" target="Code" class="method-signature"
|
184
|
+
onclick="popupCode('RubyCache.src/M000107.html');return false;">
|
185
185
|
<span class="method-name">delete_unlocked</span><span class="method-args">( key )</span>
|
186
186
|
</a>
|
187
187
|
</div>
|
@@ -190,12 +190,12 @@ Default cache.
|
|
190
190
|
</div>
|
191
191
|
</div>
|
192
192
|
|
193
|
-
<div id="method-
|
194
|
-
<a name="
|
193
|
+
<div id="method-M000102" class="method-detail">
|
194
|
+
<a name="M000102"></a>
|
195
195
|
|
196
196
|
<div class="method-heading">
|
197
|
-
<a href="RubyCache.src/
|
198
|
-
onclick="popupCode('RubyCache.src/
|
197
|
+
<a href="RubyCache.src/M000102.html" target="Code" class="method-signature"
|
198
|
+
onclick="popupCode('RubyCache.src/M000102.html');return false;">
|
199
199
|
<span class="method-name">get</span><span class="method-args">( uri, params )</span>
|
200
200
|
</a>
|
201
201
|
</div>
|
@@ -204,12 +204,12 @@ Default cache.
|
|
204
204
|
</div>
|
205
205
|
</div>
|
206
206
|
|
207
|
-
<div id="method-
|
208
|
-
<a name="
|
207
|
+
<div id="method-M000105" class="method-detail">
|
208
|
+
<a name="M000105"></a>
|
209
209
|
|
210
210
|
<div class="method-heading">
|
211
|
-
<a href="RubyCache.src/
|
212
|
-
onclick="popupCode('RubyCache.src/
|
211
|
+
<a href="RubyCache.src/M000105.html" target="Code" class="method-signature"
|
212
|
+
onclick="popupCode('RubyCache.src/M000105.html');return false;">
|
213
213
|
<span class="method-name">keys</span><span class="method-args">() {|key, data| ...}</span>
|
214
214
|
</a>
|
215
215
|
</div>
|
@@ -218,12 +218,12 @@ Default cache.
|
|
218
218
|
</div>
|
219
219
|
</div>
|
220
220
|
|
221
|
-
<div id="method-
|
222
|
-
<a name="
|
221
|
+
<div id="method-M000103" class="method-detail">
|
222
|
+
<a name="M000103"></a>
|
223
223
|
|
224
224
|
<div class="method-heading">
|
225
|
-
<a href="RubyCache.src/
|
226
|
-
onclick="popupCode('RubyCache.src/
|
225
|
+
<a href="RubyCache.src/M000103.html" target="Code" class="method-signature"
|
226
|
+
onclick="popupCode('RubyCache.src/M000103.html');return false;">
|
227
227
|
<span class="method-name">put</span><span class="method-args">( uri, params, max_age, body )</span>
|
228
228
|
</a>
|
229
229
|
</div>
|
@@ -232,12 +232,12 @@ Default cache.
|
|
232
232
|
</div>
|
233
233
|
</div>
|
234
234
|
|
235
|
-
<div id="method-
|
236
|
-
<a name="
|
235
|
+
<div id="method-M000104" class="method-detail">
|
236
|
+
<a name="M000104"></a>
|
237
237
|
|
238
238
|
<div class="method-heading">
|
239
|
-
<a href="RubyCache.src/
|
240
|
-
onclick="popupCode('RubyCache.src/
|
239
|
+
<a href="RubyCache.src/M000104.html" target="Code" class="method-signature"
|
240
|
+
onclick="popupCode('RubyCache.src/M000104.html');return false;">
|
241
241
|
<span class="method-name">sweep!</span><span class="method-args">()</span>
|
242
242
|
</a>
|
243
243
|
</div>
|
@@ -249,12 +249,12 @@ run through the cache and dump anything that has expired
|
|
249
249
|
</div>
|
250
250
|
</div>
|
251
251
|
|
252
|
-
<div id="method-
|
253
|
-
<a name="
|
252
|
+
<div id="method-M000108" class="method-detail">
|
253
|
+
<a name="M000108"></a>
|
254
254
|
|
255
255
|
<div class="method-heading">
|
256
|
-
<a href="RubyCache.src/
|
257
|
-
onclick="popupCode('RubyCache.src/
|
256
|
+
<a href="RubyCache.src/M000108.html" target="Code" class="method-signature"
|
257
|
+
onclick="popupCode('RubyCache.src/M000108.html');return false;">
|
258
258
|
<span class="method-name">sweep_unlocked!</span><span class="method-args">()</span>
|
259
259
|
</a>
|
260
260
|
</div>
|
@@ -10,11 +10,11 @@
|
|
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
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/esi/cache.rb, line 167</span>
|
14
|
+
167: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>( <span class="ruby-identifier">options</span> = {} )
|
15
|
+
168: <span class="ruby-keyword kw">super</span>()
|
16
|
+
169: <span class="ruby-ivar">@semaphore</span> = <span class="ruby-constant">Mutex</span>.<span class="ruby-identifier">new</span>
|
17
|
+
170: <span class="ruby-ivar">@cache</span> = {}
|
18
|
+
171: <span class="ruby-keyword kw">end</span></pre>
|
19
19
|
</body>
|
20
20
|
</html>
|
@@ -10,11 +10,11 @@
|
|
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
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/esi/cache.rb, line 173</span>
|
14
|
+
173: <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
|
+
174: <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>)
|
16
|
+
175: <span class="ruby-identifier">fragment</span> = <span class="ruby-ivar">@semaphore</span>.<span class="ruby-identifier">synchronize</span> { <span class="ruby-ivar">@cache</span>[<span class="ruby-identifier">key</span>] }
|
17
|
+
176: <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>
|
18
|
+
177: <span class="ruby-keyword kw">end</span></pre>
|
19
19
|
</body>
|
20
20
|
</html>
|
@@ -10,11 +10,11 @@
|
|
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
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/esi/cache.rb, line 179</span>
|
14
|
+
179: <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
|
+
180: <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>)
|
16
|
+
181: <span class="ruby-identifier">fragment</span> = <span class="ruby-ivar">@semaphore</span>.<span class="ruby-identifier">synchronize</span> { <span class="ruby-ivar">@cache</span>[<span class="ruby-identifier">key</span>] }
|
17
|
+
182: <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">valid?</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>)
|
18
|
+
183: <span class="ruby-keyword kw">end</span></pre>
|
19
19
|
</body>
|
20
20
|
</html>
|
@@ -10,13 +10,13 @@
|
|
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
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/esi/cache.rb, line 185</span>
|
14
|
+
185: <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
|
+
186: <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>)
|
16
|
+
187: <span class="ruby-ivar">@semaphore</span>.<span class="ruby-identifier">synchronize</span> <span class="ruby-keyword kw">do</span>
|
17
|
+
188: <span class="ruby-ivar">@cache</span>[<span class="ruby-identifier">key</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>)
|
18
|
+
189: <span class="ruby-identifier">sweep_unlocked!</span>
|
19
|
+
190: <span class="ruby-keyword kw">end</span>
|
20
|
+
191: <span class="ruby-keyword kw">end</span></pre>
|
21
21
|
</body>
|
22
22
|
</html>
|