mongrel_esi 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README +8 -8
- data/Rakefile +4 -12
- data/doc/rdoc/classes/ESI.html +169 -0
- data/doc/rdoc/classes/ESI/Cache.html +178 -0
- data/doc/rdoc/classes/ESI/Cache.src/M000060.html +17 -0
- data/doc/rdoc/classes/ESI/Cache.src/M000061.html +20 -0
- data/doc/rdoc/classes/ESI/Config.html +291 -0
- data/doc/rdoc/classes/ESI/Config.src/M000043.html +18 -0
- data/doc/rdoc/classes/ESI/Config.src/M000044.html +18 -0
- data/doc/rdoc/classes/ESI/Config.src/M000045.html +35 -0
- data/doc/rdoc/classes/ESI/Config.src/M000046.html +38 -0
- data/doc/rdoc/classes/ESI/Config.src/M000047.html +23 -0
- data/doc/rdoc/classes/ESI/Config.src/M000048.html +18 -0
- data/doc/rdoc/classes/ESI/Config.src/M000049.html +20 -0
- data/doc/rdoc/classes/ESI/Config.src/M000050.html +18 -0
- data/doc/rdoc/classes/ESI/Config.src/M000051.html +24 -0
- data/doc/rdoc/classes/ESI/Config/CacheConfig.html +212 -0
- data/doc/rdoc/classes/ESI/Config/CacheConfig.src/M000055.html +19 -0
- data/doc/rdoc/classes/ESI/Config/CacheConfig.src/M000056.html +19 -0
- data/doc/rdoc/classes/ESI/Config/CacheConfig.src/M000057.html +18 -0
- data/doc/rdoc/classes/ESI/Config/CacheConfig.src/M000058.html +18 -0
- data/doc/rdoc/classes/ESI/Config/CacheConfig.src/M000059.html +18 -0
- data/doc/rdoc/classes/ESI/Config/ConfigRouter.html +187 -0
- data/doc/rdoc/classes/ESI/Config/ConfigRouter.src/M000052.html +19 -0
- data/doc/rdoc/classes/ESI/Config/ConfigRouter.src/M000053.html +21 -0
- data/doc/rdoc/classes/ESI/Config/ConfigRouter.src/M000054.html +21 -0
- data/doc/rdoc/classes/ESI/Dispatcher.html +172 -0
- data/doc/rdoc/classes/ESI/Dispatcher.src/M000062.html +23 -0
- data/doc/rdoc/classes/ESI/Dispatcher.src/M000063.html +20 -0
- data/doc/rdoc/classes/ESI/Fragment.html +218 -0
- data/doc/rdoc/classes/ESI/Fragment.src/M000076.html +21 -0
- data/doc/rdoc/classes/ESI/Fragment.src/M000077.html +18 -0
- data/doc/rdoc/classes/ESI/Fragment.src/M000078.html +18 -0
- data/doc/rdoc/classes/ESI/Handler.html +236 -0
- data/doc/rdoc/classes/ESI/Handler.src/M000079.html +19 -0
- data/doc/rdoc/classes/ESI/Handler.src/M000080.html +161 -0
- data/doc/rdoc/classes/ESI/Handler.src/M000081.html +24 -0
- data/doc/rdoc/classes/ESI/Handler.src/M000082.html +18 -0
- data/doc/rdoc/classes/ESI/Handler.src/M000083.html +26 -0
- data/doc/rdoc/classes/ESI/Handler.src/M000084.html +30 -0
- data/doc/rdoc/classes/ESI/Invalidator.html +131 -0
- data/doc/rdoc/classes/ESI/Invalidator.src/M000004.html +41 -0
- data/doc/rdoc/classes/ESI/Log.html +251 -0
- data/doc/rdoc/classes/ESI/Log.src/M000005.html +18 -0
- data/doc/rdoc/classes/ESI/Log.src/M000006.html +18 -0
- data/doc/rdoc/classes/ESI/Log.src/M000007.html +18 -0
- data/doc/rdoc/classes/ESI/Log.src/M000008.html +18 -0
- data/doc/rdoc/classes/ESI/Log.src/M000009.html +18 -0
- data/doc/rdoc/classes/ESI/Log.src/M000010.html +18 -0
- data/doc/rdoc/classes/ESI/Log.src/M000011.html +18 -0
- data/doc/rdoc/classes/ESI/Log.src/M000012.html +18 -0
- data/doc/rdoc/classes/ESI/Log.src/M000013.html +18 -0
- data/doc/rdoc/classes/ESI/MemcachedCache.html +314 -0
- data/doc/rdoc/classes/ESI/MemcachedCache.src/M000034.html +24 -0
- data/doc/rdoc/classes/ESI/MemcachedCache.src/M000035.html +22 -0
- data/doc/rdoc/classes/ESI/MemcachedCache.src/M000036.html +19 -0
- data/doc/rdoc/classes/ESI/MemcachedCache.src/M000037.html +23 -0
- data/doc/rdoc/classes/ESI/MemcachedCache.src/M000038.html +18 -0
- data/doc/rdoc/classes/ESI/MemcachedCache.src/M000039.html +19 -0
- data/doc/rdoc/classes/ESI/MemcachedCache.src/M000040.html +18 -0
- data/doc/rdoc/classes/ESI/MemcachedCache.src/M000041.html +18 -0
- data/doc/rdoc/classes/ESI/MemcachedCache.src/M000042.html +17 -0
- data/doc/rdoc/classes/ESI/Router.html +229 -0
- data/doc/rdoc/classes/ESI/Router.src/M000073.html +36 -0
- data/doc/rdoc/classes/ESI/Router.src/M000074.html +25 -0
- data/doc/rdoc/classes/ESI/Router.src/M000075.html +24 -0
- data/doc/rdoc/classes/ESI/RubyCache.html +278 -0
- data/doc/rdoc/classes/ESI/RubyCache.src/M000064.html +20 -0
- data/doc/rdoc/classes/ESI/RubyCache.src/M000065.html +22 -0
- data/doc/rdoc/classes/ESI/RubyCache.src/M000066.html +21 -0
- data/doc/rdoc/classes/ESI/RubyCache.src/M000067.html +22 -0
- data/doc/rdoc/classes/ESI/RubyCache.src/M000068.html +18 -0
- data/doc/rdoc/classes/ESI/RubyCache.src/M000069.html +22 -0
- data/doc/rdoc/classes/ESI/RubyCache.src/M000070.html +18 -0
- data/doc/rdoc/classes/ESI/RubyCache.src/M000071.html +18 -0
- data/doc/rdoc/classes/ESI/RubyCache.src/M000072.html +18 -0
- data/doc/rdoc/classes/ESI/Tag.html +137 -0
- data/doc/rdoc/classes/ESI/Tag/Attempt.html +113 -0
- data/doc/rdoc/classes/ESI/Tag/Base.html +267 -0
- data/doc/rdoc/classes/ESI/Tag/Base.src/M000028.html +26 -0
- data/doc/rdoc/classes/ESI/Tag/Base.src/M000029.html +23 -0
- data/doc/rdoc/classes/ESI/Tag/Base.src/M000030.html +22 -0
- data/doc/rdoc/classes/ESI/Tag/Base.src/M000031.html +18 -0
- data/doc/rdoc/classes/ESI/Tag/Base.src/M000032.html +22 -0
- data/doc/rdoc/classes/ESI/Tag/Base.src/M000033.html +23 -0
- data/doc/rdoc/classes/ESI/Tag/Except.html +184 -0
- data/doc/rdoc/classes/ESI/Tag/Except.src/M000020.html +21 -0
- data/doc/rdoc/classes/ESI/Tag/Except.src/M000021.html +20 -0
- data/doc/rdoc/classes/ESI/Tag/Except.src/M000022.html +18 -0
- data/doc/rdoc/classes/ESI/Tag/Include.html +189 -0
- data/doc/rdoc/classes/ESI/Tag/Include.src/M000017.html +20 -0
- data/doc/rdoc/classes/ESI/Tag/Include.src/M000018.html +18 -0
- data/doc/rdoc/classes/ESI/Tag/Include.src/M000019.html +125 -0
- data/doc/rdoc/classes/ESI/Tag/IncludeRequest.html +199 -0
- data/doc/rdoc/classes/ESI/Tag/IncludeRequest.src/M000014.html +18 -0
- data/doc/rdoc/classes/ESI/Tag/IncludeRequest.src/M000015.html +42 -0
- data/doc/rdoc/classes/ESI/Tag/IncludeRequest/Error.html +155 -0
- data/doc/rdoc/classes/ESI/Tag/IncludeRequest/Error.src/M000016.html +19 -0
- data/doc/rdoc/classes/ESI/Tag/Invalidate.html +171 -0
- data/doc/rdoc/classes/ESI/Tag/Invalidate.src/M000025.html +19 -0
- data/doc/rdoc/classes/ESI/Tag/Invalidate.src/M000026.html +51 -0
- data/doc/rdoc/classes/ESI/Tag/Invalidate.src/M000027.html +19 -0
- data/doc/rdoc/classes/ESI/Tag/Try.html +161 -0
- data/doc/rdoc/classes/ESI/Tag/Try.src/M000023.html +40 -0
- data/doc/rdoc/classes/ESI/Tag/Try.src/M000024.html +18 -0
- data/doc/rdoc/classes/MultiDirHandler.html +198 -0
- data/doc/rdoc/classes/MultiDirHandler.src/M000001.html +20 -0
- data/doc/rdoc/classes/MultiDirHandler.src/M000002.html +28 -0
- data/doc/rdoc/classes/MultiDirHandler.src/M000003.html +22 -0
- data/doc/rdoc/classes/Net.html +119 -0
- data/doc/rdoc/classes/Net/An.html +114 -0
- data/doc/rdoc/classes/Net/An/HTTP.html +137 -0
- data/doc/rdoc/classes/Net/An/HTTP.src/M000087.html +17 -0
- data/doc/rdoc/classes/Net/An/IORequest.html +139 -0
- data/doc/rdoc/classes/Net/An/IORequest.src/M000088.html +17 -0
- data/doc/rdoc/classes/Net/An/IOResponse.html +139 -0
- data/doc/rdoc/classes/Net/An/IOResponse.src/M000085.html +17 -0
- data/doc/rdoc/classes/Net/An/IOSocket.html +137 -0
- data/doc/rdoc/classes/Net/An/IOSocket.src/M000086.html +17 -0
- data/doc/rdoc/created.rid +1 -0
- data/doc/rdoc/files/COPYING.html +168 -0
- data/doc/rdoc/files/LICENSE.html +605 -0
- data/doc/rdoc/files/README.html +361 -0
- data/doc/rdoc/files/lib/esi/cache_rb.html +113 -0
- data/doc/rdoc/files/lib/esi/config_rb.html +108 -0
- data/doc/rdoc/files/lib/esi/dispatcher_rb.html +109 -0
- data/doc/rdoc/files/lib/esi/handler_rb.html +121 -0
- data/doc/rdoc/files/lib/esi/invalidator_rb.html +117 -0
- data/doc/rdoc/files/lib/esi/logger_rb.html +108 -0
- data/doc/rdoc/files/lib/esi/router_rb.html +101 -0
- data/doc/rdoc/files/lib/esi/tag/attempt_rb.html +101 -0
- data/doc/rdoc/files/lib/esi/tag/base_rb.html +108 -0
- data/doc/rdoc/files/lib/esi/tag/except_rb.html +101 -0
- data/doc/rdoc/files/lib/esi/tag/include_rb.html +109 -0
- data/doc/rdoc/files/lib/esi/tag/invalidate_rb.html +109 -0
- data/doc/rdoc/files/lib/esi/tag/try_rb.html +108 -0
- data/doc/rdoc/files/lib/multi_dirhandler_rb.html +109 -0
- data/doc/rdoc/files/lib/net/ahttp_rb.html +109 -0
- data/doc/rdoc/fr_class_index.html +55 -0
- data/doc/rdoc/fr_file_index.html +44 -0
- data/doc/rdoc/fr_method_index.html +114 -0
- data/doc/rdoc/index.html +24 -0
- data/doc/rdoc/rdoc-style.css +208 -0
- data/ext/esi/esi_parser.c +36 -156
- data/ext/esi/test/parser.c +42 -43
- data/ext/esi/test1.rb +2 -2
- data/lib/esi/cache.rb +83 -72
- data/lib/esi/handler.rb +5 -20
- data/lib/multi_dirhandler.rb +13 -0
- data/lib/net/ahttp.rb +36 -0
- data/test/integration/handler_test.rb +1 -1
- metadata +222 -45
- data/test/unit/sample.html +0 -21
@@ -0,0 +1,20 @@
|
|
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>cache_key (ESI::Cache)</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 56</span>
|
14
|
+
56: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cache_key</span>( <span class="ruby-identifier">uri</span>, <span class="ruby-identifier">params</span> )
|
15
|
+
57: <span class="ruby-identifier">http_x_requested_with</span> = <span class="ruby-identifier">params</span>[<span class="ruby-value str">'HTTP_X_REQUESTED_WITH'</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">params</span>[<span class="ruby-value str">"X-Requested-With"</span>]
|
16
|
+
58: <span class="ruby-identifier">key</span> = <span class="ruby-constant">Digest</span><span class="ruby-operator">::</span><span class="ruby-constant">SHA1</span>.<span class="ruby-identifier">hexdigest</span>(<span class="ruby-node">"#{uri}-#{http_x_requested_with}"</span>)
|
17
|
+
59: <span class="ruby-identifier">key</span>
|
18
|
+
60: <span class="ruby-keyword kw">end</span></pre>
|
19
|
+
</body>
|
20
|
+
</html>
|
@@ -0,0 +1,291 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: ESI::Config</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">ESI::Config</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../files/lib/esi/config_rb.html">
|
59
|
+
lib/esi/config.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
Object
|
69
|
+
</td>
|
70
|
+
</tr>
|
71
|
+
</table>
|
72
|
+
</div>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<div id="contextContent">
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
</div>
|
84
|
+
|
85
|
+
<div id="method-list">
|
86
|
+
<h3 class="section-bar">Methods</h3>
|
87
|
+
|
88
|
+
<div class="name-list">
|
89
|
+
<a href="#M000044">[]</a>
|
90
|
+
<a href="#M000046">cache</a>
|
91
|
+
<a href="#M000051">define</a>
|
92
|
+
<a href="#M000045">enable_esi_processor?</a>
|
93
|
+
<a href="#M000047">esi</a>
|
94
|
+
<a href="#M000043">new</a>
|
95
|
+
<a href="#M000048">router</a>
|
96
|
+
<a href="#M000049">routes</a>
|
97
|
+
<a href="#M000050">start_invalidator?</a>
|
98
|
+
</div>
|
99
|
+
</div>
|
100
|
+
|
101
|
+
</div>
|
102
|
+
|
103
|
+
|
104
|
+
<!-- if includes -->
|
105
|
+
|
106
|
+
<div id="section">
|
107
|
+
|
108
|
+
<div id="class-list">
|
109
|
+
<h3 class="section-bar">Classes and Modules</h3>
|
110
|
+
|
111
|
+
Class <a href="Config/CacheConfig.html" class="link">ESI::Config::CacheConfig</a><br />
|
112
|
+
Class <a href="Config/ConfigRouter.html" class="link">ESI::Config::ConfigRouter</a><br />
|
113
|
+
|
114
|
+
</div>
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
<div id="attribute-list">
|
120
|
+
<h3 class="section-bar">Attributes</h3>
|
121
|
+
|
122
|
+
<div class="name-list">
|
123
|
+
<table>
|
124
|
+
<tr class="top-aligned-row context-row">
|
125
|
+
<td class="context-item-name">config</td>
|
126
|
+
<td class="context-item-value"> [R] </td>
|
127
|
+
<td class="context-item-desc"></td>
|
128
|
+
</tr>
|
129
|
+
</table>
|
130
|
+
</div>
|
131
|
+
</div>
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
<!-- if method_list -->
|
136
|
+
<div id="methods">
|
137
|
+
<h3 class="section-bar">Public Class methods</h3>
|
138
|
+
|
139
|
+
<div id="method-M000051" class="method-detail">
|
140
|
+
<a name="M000051"></a>
|
141
|
+
|
142
|
+
<div class="method-heading">
|
143
|
+
<a href="Config.src/M000051.html" target="Code" class="method-signature"
|
144
|
+
onclick="popupCode('Config.src/M000051.html');return false;">
|
145
|
+
<span class="method-name">define</span><span class="method-args">( listeners ) {|config| ...}</span>
|
146
|
+
</a>
|
147
|
+
</div>
|
148
|
+
|
149
|
+
<div class="method-description">
|
150
|
+
</div>
|
151
|
+
</div>
|
152
|
+
|
153
|
+
<div id="method-M000043" class="method-detail">
|
154
|
+
<a name="M000043"></a>
|
155
|
+
|
156
|
+
<div class="method-heading">
|
157
|
+
<a href="Config.src/M000043.html" target="Code" class="method-signature"
|
158
|
+
onclick="popupCode('Config.src/M000043.html');return false;">
|
159
|
+
<span class="method-name">new</span><span class="method-args">(options)</span>
|
160
|
+
</a>
|
161
|
+
</div>
|
162
|
+
|
163
|
+
<div class="method-description">
|
164
|
+
</div>
|
165
|
+
</div>
|
166
|
+
|
167
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
168
|
+
|
169
|
+
<div id="method-M000044" class="method-detail">
|
170
|
+
<a name="M000044"></a>
|
171
|
+
|
172
|
+
<div class="method-heading">
|
173
|
+
<a href="Config.src/M000044.html" target="Code" class="method-signature"
|
174
|
+
onclick="popupCode('Config.src/M000044.html');return false;">
|
175
|
+
<span class="method-name">[]</span><span class="method-args">(key)</span>
|
176
|
+
</a>
|
177
|
+
</div>
|
178
|
+
|
179
|
+
<div class="method-description">
|
180
|
+
<p>
|
181
|
+
access configuration values
|
182
|
+
</p>
|
183
|
+
</div>
|
184
|
+
</div>
|
185
|
+
|
186
|
+
<div id="method-M000046" class="method-detail">
|
187
|
+
<a name="M000046"></a>
|
188
|
+
|
189
|
+
<div class="method-heading">
|
190
|
+
<a href="Config.src/M000046.html" target="Code" class="method-signature"
|
191
|
+
onclick="popupCode('Config.src/M000046.html');return false;">
|
192
|
+
<span class="method-name">cache</span><span class="method-args">() {|cache_options| ...}</span>
|
193
|
+
</a>
|
194
|
+
</div>
|
195
|
+
|
196
|
+
<div class="method-description">
|
197
|
+
<p>
|
198
|
+
returns the <a href="Config.html#M000046">cache</a> object as given in the
|
199
|
+
config/esi.yml <a href="Config.html#M000046">cache</a>: key, or defaults to
|
200
|
+
ruby as in uses this process the options allowed are ruby and memcache
|
201
|
+
</p>
|
202
|
+
</div>
|
203
|
+
</div>
|
204
|
+
|
205
|
+
<div id="method-M000045" class="method-detail">
|
206
|
+
<a name="M000045"></a>
|
207
|
+
|
208
|
+
<div class="method-heading">
|
209
|
+
<a href="Config.src/M000045.html" target="Code" class="method-signature"
|
210
|
+
onclick="popupCode('Config.src/M000045.html');return false;">
|
211
|
+
<span class="method-name">enable_esi_processor?</span><span class="method-args">( headers )</span>
|
212
|
+
</a>
|
213
|
+
</div>
|
214
|
+
|
215
|
+
<div class="method-description">
|
216
|
+
</div>
|
217
|
+
</div>
|
218
|
+
|
219
|
+
<div id="method-M000047" class="method-detail">
|
220
|
+
<a name="M000047"></a>
|
221
|
+
|
222
|
+
<div class="method-heading">
|
223
|
+
<a href="Config.src/M000047.html" target="Code" class="method-signature"
|
224
|
+
onclick="popupCode('Config.src/M000047.html');return false;">
|
225
|
+
<span class="method-name">esi</span><span class="method-args">() {|options| ...}</span>
|
226
|
+
</a>
|
227
|
+
</div>
|
228
|
+
|
229
|
+
<div class="method-description">
|
230
|
+
</div>
|
231
|
+
</div>
|
232
|
+
|
233
|
+
<div id="method-M000048" class="method-detail">
|
234
|
+
<a name="M000048"></a>
|
235
|
+
|
236
|
+
<div class="method-heading">
|
237
|
+
<a href="Config.src/M000048.html" target="Code" class="method-signature"
|
238
|
+
onclick="popupCode('Config.src/M000048.html');return false;">
|
239
|
+
<span class="method-name">router</span><span class="method-args">()</span>
|
240
|
+
</a>
|
241
|
+
</div>
|
242
|
+
|
243
|
+
<div class="method-description">
|
244
|
+
</div>
|
245
|
+
</div>
|
246
|
+
|
247
|
+
<div id="method-M000049" class="method-detail">
|
248
|
+
<a name="M000049"></a>
|
249
|
+
|
250
|
+
<div class="method-heading">
|
251
|
+
<a href="Config.src/M000049.html" target="Code" class="method-signature"
|
252
|
+
onclick="popupCode('Config.src/M000049.html');return false;">
|
253
|
+
<span class="method-name">routes</span><span class="method-args">() {|config_router| ...}</span>
|
254
|
+
</a>
|
255
|
+
</div>
|
256
|
+
|
257
|
+
<div class="method-description">
|
258
|
+
</div>
|
259
|
+
</div>
|
260
|
+
|
261
|
+
<div id="method-M000050" class="method-detail">
|
262
|
+
<a name="M000050"></a>
|
263
|
+
|
264
|
+
<div class="method-heading">
|
265
|
+
<a href="Config.src/M000050.html" target="Code" class="method-signature"
|
266
|
+
onclick="popupCode('Config.src/M000050.html');return false;">
|
267
|
+
<span class="method-name">start_invalidator?</span><span class="method-args">()</span>
|
268
|
+
</a>
|
269
|
+
</div>
|
270
|
+
|
271
|
+
<div class="method-description">
|
272
|
+
<p>
|
273
|
+
return true/false depending on the value of invalidator: on/off within in
|
274
|
+
config/esi.yml
|
275
|
+
</p>
|
276
|
+
</div>
|
277
|
+
</div>
|
278
|
+
|
279
|
+
|
280
|
+
</div>
|
281
|
+
|
282
|
+
|
283
|
+
</div>
|
284
|
+
|
285
|
+
|
286
|
+
<div id="validator-badges">
|
287
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
288
|
+
</div>
|
289
|
+
|
290
|
+
</body>
|
291
|
+
</html>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>new (ESI::Config)</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/config.rb, line 8</span>
|
14
|
+
8: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">options</span>)
|
15
|
+
9: <span class="ruby-ivar">@config</span> = <span class="ruby-identifier">options</span>
|
16
|
+
10: <span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>[] (ESI::Config)</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/config.rb, line 13</span>
|
14
|
+
13: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]</span>(<span class="ruby-identifier">key</span>)
|
15
|
+
14: <span class="ruby-ivar">@config</span>[<span class="ruby-identifier">key</span>]
|
16
|
+
15: <span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,35 @@
|
|
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>enable_esi_processor? (ESI::Config)</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/config.rb, line 17</span>
|
14
|
+
17: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">enable_esi_processor?</span>( <span class="ruby-identifier">headers</span> )
|
15
|
+
18: <span class="ruby-comment cmt"># check for surrogate control configuration</span>
|
16
|
+
19: <span class="ruby-comment cmt"># check for matching content type</span>
|
17
|
+
20: <span class="ruby-comment cmt"># if both are set it surrogate takes presendence </span>
|
18
|
+
21: <span class="ruby-identifier">use_esi</span> = <span class="ruby-keyword kw">false</span>
|
19
|
+
22: <span class="ruby-identifier">allowed_content_types</span> = <span class="ruby-ivar">@config</span>[<span class="ruby-identifier">:allowed_content_types</span>]
|
20
|
+
23:
|
21
|
+
24: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">allowed_content_types</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">headers</span>[<span class="ruby-value str">"Content-Type"</span>] <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">allowed_content_types</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:detect</span>)
|
22
|
+
25: <span class="ruby-identifier">use_esi</span> = <span class="ruby-identifier">allowed_content_types</span>.<span class="ruby-identifier">detect</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">type</span><span class="ruby-operator">|</span>
|
23
|
+
26: <span class="ruby-identifier">headers</span>[<span class="ruby-value str">"Content-Type"</span>].<span class="ruby-identifier">match</span>( <span class="ruby-identifier">type</span> )
|
24
|
+
27: <span class="ruby-keyword kw">end</span>
|
25
|
+
28: <span class="ruby-identifier">use_esi</span> = <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">use_esi</span>
|
26
|
+
29: <span class="ruby-keyword kw">end</span>
|
27
|
+
30:
|
28
|
+
31: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@config</span>[<span class="ruby-identifier">:enable_for_surrogate_only</span>]
|
29
|
+
32: <span class="ruby-identifier">use_esi</span> = <span class="ruby-identifier">headers</span>[<span class="ruby-value str">"Surrogate-Control"</span>] <span class="ruby-keyword kw">and</span> <span class="ruby-regexp re">/ESI/</span>.<span class="ruby-identifier">match</span>(<span class="ruby-identifier">headers</span>[<span class="ruby-value str">"Surrogate-Control"</span>])
|
30
|
+
33: <span class="ruby-keyword kw">end</span>
|
31
|
+
34:
|
32
|
+
35: <span class="ruby-identifier">use_esi</span>
|
33
|
+
36: <span class="ruby-keyword kw">end</span></pre>
|
34
|
+
</body>
|
35
|
+
</html>
|
@@ -0,0 +1,38 @@
|
|
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>cache (ESI::Config)</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/config.rb, line 67</span>
|
14
|
+
67: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cache</span>
|
15
|
+
68: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
|
16
|
+
69: <span class="ruby-comment cmt"># allow this method to be called in config scripts</span>
|
17
|
+
70: <span class="ruby-identifier">cache_options</span> = <span class="ruby-constant">CacheConfig</span>.<span class="ruby-identifier">new</span>
|
18
|
+
71: <span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">cache_options</span>
|
19
|
+
72: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cache_options</span>.<span class="ruby-identifier">memcached?</span>
|
20
|
+
73: <span class="ruby-ivar">@config</span>[<span class="ruby-identifier">:cache</span>] = <span class="ruby-value str">'memcached'</span>
|
21
|
+
74: <span class="ruby-keyword kw">end</span>
|
22
|
+
75: <span class="ruby-ivar">@config</span>[<span class="ruby-identifier">:cache_options</span>] = <span class="ruby-identifier">cache_options</span>.<span class="ruby-identifier">options</span>
|
23
|
+
76: <span class="ruby-keyword kw">else</span>
|
24
|
+
77: <span class="ruby-identifier">cache_type</span> = <span class="ruby-ivar">@config</span>[<span class="ruby-identifier">:cache</span>]
|
25
|
+
78: <span class="ruby-identifier">options</span> = <span class="ruby-ivar">@config</span>[<span class="ruby-identifier">:cache_options</span>]
|
26
|
+
79: <span class="ruby-comment cmt"># always return the same cache object, per process</span>
|
27
|
+
80: <span class="ruby-identifier">$cache</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">cache_type</span>
|
28
|
+
81: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'ruby'</span>
|
29
|
+
82: <span class="ruby-constant">ESI</span><span class="ruby-operator">::</span><span class="ruby-constant">RubyCache</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">options</span>)
|
30
|
+
83: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'memcached'</span>
|
31
|
+
84: <span class="ruby-constant">ESI</span><span class="ruby-operator">::</span><span class="ruby-constant">MemcachedCache</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">options</span>)
|
32
|
+
85: <span class="ruby-keyword kw">else</span>
|
33
|
+
86: <span class="ruby-identifier">raise</span> <span class="ruby-value str">"Unsupported cache"</span>
|
34
|
+
87: <span class="ruby-keyword kw">end</span>
|
35
|
+
88: <span class="ruby-keyword kw">end</span>
|
36
|
+
89: <span class="ruby-keyword kw">end</span></pre>
|
37
|
+
</body>
|
38
|
+
</html>
|
@@ -0,0 +1,23 @@
|
|
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>esi (ESI::Config)</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/config.rb, line 91</span>
|
14
|
+
91: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">esi</span>
|
15
|
+
92: <span class="ruby-identifier">options</span> = <span class="ruby-constant">OpenStruct</span>.<span class="ruby-identifier">new</span>({})
|
16
|
+
93: <span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">options</span>
|
17
|
+
94: <span class="ruby-ivar">@config</span>[<span class="ruby-identifier">:allowed_content_types</span>] = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">allowed_content_types</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">allowed_content_types</span>
|
18
|
+
95: <span class="ruby-ivar">@config</span>[<span class="ruby-identifier">:enable_for_surrogate_only</span>] = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">enable_for_surrogate_only</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">enable_for_surrogate_only</span>
|
19
|
+
96: <span class="ruby-ivar">@config</span>[<span class="ruby-identifier">:chunk_size</span>] = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">chunk_size</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">chunk_size</span>
|
20
|
+
97: <span class="ruby-ivar">@config</span>[<span class="ruby-identifier">:max_depth</span>] = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">max_depth</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">max_depth</span>
|
21
|
+
98: <span class="ruby-keyword kw">end</span></pre>
|
22
|
+
</body>
|
23
|
+
</html>
|