cachetastic 1.0.8 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/doc/classes/Cachetastic/Caches/Base/RegisteredCaches.html +157 -0
- data/doc/classes/Cachetastic/Caches/Base/RegisteredCaches.src/M000044.html +18 -0
- data/doc/classes/Cachetastic/Caches/Base.html +94 -28
- data/doc/classes/Cachetastic/Caches/Base.src/M000033.html +4 -14
- data/doc/classes/Cachetastic/Caches/Base.src/M000034.html +6 -18
- data/doc/classes/Cachetastic/Caches/Base.src/M000035.html +13 -5
- data/doc/classes/Cachetastic/Caches/Base.src/M000036.html +18 -5
- data/doc/classes/Cachetastic/Caches/Base.src/M000037.html +6 -4
- data/doc/classes/Cachetastic/Caches/Base.src/M000038.html +5 -4
- data/doc/classes/Cachetastic/Caches/Base.src/M000039.html +4 -4
- data/doc/classes/Cachetastic/Caches/Base.src/M000040.html +18 -0
- data/doc/classes/Cachetastic/Caches/Base.src/M000041.html +18 -0
- data/doc/classes/Cachetastic/Caches/Base.src/M000042.html +18 -0
- data/doc/classes/Cachetastic/Caches/Base.src/M000043.html +18 -0
- data/doc/classes/Cachetastic/Connection.html +11 -11
- data/doc/classes/Cachetastic/Connection.src/{M000040.html → M000045.html} +0 -0
- data/doc/classes/Cachetastic/Connection.src/{M000041.html → M000046.html} +0 -0
- data/doc/classes/Cachetastic/Logger.html +5 -5
- data/doc/classes/Cachetastic/Logger.src/{M000042.html → M000047.html} +0 -0
- data/doc/created.rid +1 -1
- data/doc/files/lib/caches/cachetastic_caches_base_rb.html +8 -1
- data/doc/files/lib/stores/cachetastic_stores_base_rb.html +1 -1
- data/doc/fr_class_index.html +1 -0
- data/doc/fr_method_index.html +20 -15
- data/lib/caches/cachetastic_caches_base.rb +30 -0
- data/lib/stores/cachetastic_stores_base.rb +1 -1
- data/lib/tasks/rubyforge_config.yml +1 -1
- metadata +12 -5
@@ -0,0 +1,157 @@
|
|
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: Cachetastic::Caches::Base::RegisteredCaches</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">Cachetastic::Caches::Base::RegisteredCaches</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../../../files/lib/caches/cachetastic_caches_base_rb.html">
|
59
|
+
lib/caches/cachetastic_caches_base.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">new</a>
|
90
|
+
</div>
|
91
|
+
</div>
|
92
|
+
|
93
|
+
</div>
|
94
|
+
|
95
|
+
|
96
|
+
<!-- if includes -->
|
97
|
+
<div id="includes">
|
98
|
+
<h3 class="section-bar">Included Modules</h3>
|
99
|
+
|
100
|
+
<div id="includes-list">
|
101
|
+
<span class="include-name">Singleton</span>
|
102
|
+
</div>
|
103
|
+
</div>
|
104
|
+
|
105
|
+
<div id="section">
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
<div id="attribute-list">
|
112
|
+
<h3 class="section-bar">Attributes</h3>
|
113
|
+
|
114
|
+
<div class="name-list">
|
115
|
+
<table>
|
116
|
+
<tr class="top-aligned-row context-row">
|
117
|
+
<td class="context-item-name">list</td>
|
118
|
+
<td class="context-item-value"> [R] </td>
|
119
|
+
<td class="context-item-desc"></td>
|
120
|
+
</tr>
|
121
|
+
</table>
|
122
|
+
</div>
|
123
|
+
</div>
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
<!-- if method_list -->
|
128
|
+
<div id="methods">
|
129
|
+
<h3 class="section-bar">Public Class methods</h3>
|
130
|
+
|
131
|
+
<div id="method-M000044" class="method-detail">
|
132
|
+
<a name="M000044"></a>
|
133
|
+
|
134
|
+
<div class="method-heading">
|
135
|
+
<a href="RegisteredCaches.src/M000044.html" target="Code" class="method-signature"
|
136
|
+
onclick="popupCode('RegisteredCaches.src/M000044.html');return false;">
|
137
|
+
<span class="method-name">new</span><span class="method-args">()</span>
|
138
|
+
</a>
|
139
|
+
</div>
|
140
|
+
|
141
|
+
<div class="method-description">
|
142
|
+
</div>
|
143
|
+
</div>
|
144
|
+
|
145
|
+
|
146
|
+
</div>
|
147
|
+
|
148
|
+
|
149
|
+
</div>
|
150
|
+
|
151
|
+
|
152
|
+
<div id="validator-badges">
|
153
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
154
|
+
</div>
|
155
|
+
|
156
|
+
</body>
|
157
|
+
</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 (Cachetastic::Caches::Base::RegisteredCaches)</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/caches/cachetastic_caches_base.rb, line 9</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
|
15
|
+
<span class="ruby-ivar">@list</span> = []
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -86,13 +86,17 @@
|
|
86
86
|
<h3 class="section-bar">Methods</h3>
|
87
87
|
|
88
88
|
<div class="name-list">
|
89
|
-
<a href="#
|
90
|
-
<a href="#
|
91
|
-
<a href="#
|
92
|
-
<a href="#
|
93
|
-
<a href="#
|
94
|
-
<a href="#M000034">
|
95
|
-
<a href="#
|
89
|
+
<a href="#M000033">all_registered_caches</a>
|
90
|
+
<a href="#M000041">cache_name</a>
|
91
|
+
<a href="#M000037">delete</a>
|
92
|
+
<a href="#M000038">expire_all</a>
|
93
|
+
<a href="#M000035">get</a>
|
94
|
+
<a href="#M000034">inherited</a>
|
95
|
+
<a href="#M000043">logger</a>
|
96
|
+
<a href="#M000039">populate_all</a>
|
97
|
+
<a href="#M000036">set</a>
|
98
|
+
<a href="#M000040">stats</a>
|
99
|
+
<a href="#M000042">store</a>
|
96
100
|
</div>
|
97
101
|
</div>
|
98
102
|
|
@@ -103,6 +107,12 @@
|
|
103
107
|
|
104
108
|
<div id="section">
|
105
109
|
|
110
|
+
<div id="class-list">
|
111
|
+
<h3 class="section-bar">Classes and Modules</h3>
|
112
|
+
|
113
|
+
Class <a href="Base/RegisteredCaches.html" class="link">Cachetastic::Caches::Base::RegisteredCaches</a><br />
|
114
|
+
|
115
|
+
</div>
|
106
116
|
|
107
117
|
|
108
118
|
<div id="aliases-list">
|
@@ -127,13 +137,55 @@
|
|
127
137
|
<div id="methods">
|
128
138
|
<h3 class="section-bar">Public Class methods</h3>
|
129
139
|
|
140
|
+
<div id="method-M000033" class="method-detail">
|
141
|
+
<a name="M000033"></a>
|
142
|
+
|
143
|
+
<div class="method-heading">
|
144
|
+
<a href="Base.src/M000033.html" target="Code" class="method-signature"
|
145
|
+
onclick="popupCode('Base.src/M000033.html');return false;">
|
146
|
+
<span class="method-name">all_registered_caches</span><span class="method-args">()</span>
|
147
|
+
</a>
|
148
|
+
</div>
|
149
|
+
|
150
|
+
<div class="method-description">
|
151
|
+
</div>
|
152
|
+
</div>
|
153
|
+
|
154
|
+
<div id="method-M000041" class="method-detail">
|
155
|
+
<a name="M000041"></a>
|
156
|
+
|
157
|
+
<div class="method-heading">
|
158
|
+
<a href="Base.src/M000041.html" target="Code" class="method-signature"
|
159
|
+
onclick="popupCode('Base.src/M000041.html');return false;">
|
160
|
+
<span class="method-name">cache_name</span><span class="method-args">()</span>
|
161
|
+
</a>
|
162
|
+
</div>
|
163
|
+
|
164
|
+
<div class="method-description">
|
165
|
+
</div>
|
166
|
+
</div>
|
167
|
+
|
130
168
|
<div id="method-M000037" class="method-detail">
|
131
169
|
<a name="M000037"></a>
|
132
170
|
|
133
171
|
<div class="method-heading">
|
134
172
|
<a href="Base.src/M000037.html" target="Code" class="method-signature"
|
135
173
|
onclick="popupCode('Base.src/M000037.html');return false;">
|
136
|
-
<span class="method-name">
|
174
|
+
<span class="method-name">delete</span><span class="method-args">(key, delay = 0)</span>
|
175
|
+
</a>
|
176
|
+
</div>
|
177
|
+
|
178
|
+
<div class="method-description">
|
179
|
+
</div>
|
180
|
+
</div>
|
181
|
+
|
182
|
+
<div id="method-M000038" class="method-detail">
|
183
|
+
<a name="M000038"></a>
|
184
|
+
|
185
|
+
<div class="method-heading">
|
186
|
+
<a href="Base.src/M000038.html" target="Code" class="method-signature"
|
187
|
+
onclick="popupCode('Base.src/M000038.html');return false;">
|
188
|
+
<span class="method-name">expire_all</span><span class="method-args">()</span>
|
137
189
|
</a>
|
138
190
|
</div>
|
139
191
|
|
@@ -147,7 +199,7 @@
|
|
147
199
|
<div class="method-heading">
|
148
200
|
<a href="Base.src/M000035.html" target="Code" class="method-signature"
|
149
201
|
onclick="popupCode('Base.src/M000035.html');return false;">
|
150
|
-
<span class="method-name">
|
202
|
+
<span class="method-name">get</span><span class="method-args">(key) {|if block_given?| ...}</span>
|
151
203
|
</a>
|
152
204
|
</div>
|
153
205
|
|
@@ -155,13 +207,13 @@
|
|
155
207
|
</div>
|
156
208
|
</div>
|
157
209
|
|
158
|
-
<div id="method-
|
159
|
-
<a name="
|
210
|
+
<div id="method-M000034" class="method-detail">
|
211
|
+
<a name="M000034"></a>
|
160
212
|
|
161
213
|
<div class="method-heading">
|
162
|
-
<a href="Base.src/
|
163
|
-
onclick="popupCode('Base.src/
|
164
|
-
<span class="method-name">
|
214
|
+
<a href="Base.src/M000034.html" target="Code" class="method-signature"
|
215
|
+
onclick="popupCode('Base.src/M000034.html');return false;">
|
216
|
+
<span class="method-name">inherited</span><span class="method-args">(child)</span>
|
165
217
|
</a>
|
166
218
|
</div>
|
167
219
|
|
@@ -169,13 +221,13 @@
|
|
169
221
|
</div>
|
170
222
|
</div>
|
171
223
|
|
172
|
-
<div id="method-
|
173
|
-
<a name="
|
224
|
+
<div id="method-M000043" class="method-detail">
|
225
|
+
<a name="M000043"></a>
|
174
226
|
|
175
227
|
<div class="method-heading">
|
176
|
-
<a href="Base.src/
|
177
|
-
onclick="popupCode('Base.src/
|
178
|
-
<span class="method-name">
|
228
|
+
<a href="Base.src/M000043.html" target="Code" class="method-signature"
|
229
|
+
onclick="popupCode('Base.src/M000043.html');return false;">
|
230
|
+
<span class="method-name">logger</span><span class="method-args">()</span>
|
179
231
|
</a>
|
180
232
|
</div>
|
181
233
|
|
@@ -189,7 +241,7 @@
|
|
189
241
|
<div class="method-heading">
|
190
242
|
<a href="Base.src/M000039.html" target="Code" class="method-signature"
|
191
243
|
onclick="popupCode('Base.src/M000039.html');return false;">
|
192
|
-
<span class="method-name">
|
244
|
+
<span class="method-name">populate_all</span><span class="method-args">()</span>
|
193
245
|
</a>
|
194
246
|
</div>
|
195
247
|
|
@@ -197,12 +249,12 @@
|
|
197
249
|
</div>
|
198
250
|
</div>
|
199
251
|
|
200
|
-
<div id="method-
|
201
|
-
<a name="
|
252
|
+
<div id="method-M000036" class="method-detail">
|
253
|
+
<a name="M000036"></a>
|
202
254
|
|
203
255
|
<div class="method-heading">
|
204
|
-
<a href="Base.src/
|
205
|
-
onclick="popupCode('Base.src/
|
256
|
+
<a href="Base.src/M000036.html" target="Code" class="method-signature"
|
257
|
+
onclick="popupCode('Base.src/M000036.html');return false;">
|
206
258
|
<span class="method-name">set</span><span class="method-args">(key, value, expiry = (store.all_options["default_expiry"] || 0))</span>
|
207
259
|
</a>
|
208
260
|
</div>
|
@@ -211,12 +263,26 @@
|
|
211
263
|
</div>
|
212
264
|
</div>
|
213
265
|
|
214
|
-
<div id="method-
|
215
|
-
<a name="
|
266
|
+
<div id="method-M000040" class="method-detail">
|
267
|
+
<a name="M000040"></a>
|
216
268
|
|
217
269
|
<div class="method-heading">
|
218
|
-
<a href="Base.src/
|
219
|
-
onclick="popupCode('Base.src/
|
270
|
+
<a href="Base.src/M000040.html" target="Code" class="method-signature"
|
271
|
+
onclick="popupCode('Base.src/M000040.html');return false;">
|
272
|
+
<span class="method-name">stats</span><span class="method-args">()</span>
|
273
|
+
</a>
|
274
|
+
</div>
|
275
|
+
|
276
|
+
<div class="method-description">
|
277
|
+
</div>
|
278
|
+
</div>
|
279
|
+
|
280
|
+
<div id="method-M000042" class="method-detail">
|
281
|
+
<a name="M000042"></a>
|
282
|
+
|
283
|
+
<div class="method-heading">
|
284
|
+
<a href="Base.src/M000042.html" target="Code" class="method-signature"
|
285
|
+
onclick="popupCode('Base.src/M000042.html');return false;">
|
220
286
|
<span class="method-name">store</span><span class="method-args">()</span>
|
221
287
|
</a>
|
222
288
|
</div>
|
@@ -5,24 +5,14 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>all_registered_caches (Cachetastic::Caches::Base)</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/caches/cachetastic_caches_base.rb, line
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
15
|
-
<span class="ruby-
|
16
|
-
<span class="ruby-identifier">do_with_logging</span>(<span class="ruby-identifier">:get</span>, <span class="ruby-identifier">key</span>) <span class="ruby-keyword kw">do</span>
|
17
|
-
<span class="ruby-identifier">res</span> = <span class="ruby-identifier">store</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_s</span>)
|
18
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">res</span>.<span class="ruby-identifier">nil?</span>
|
19
|
-
<span class="ruby-identifier">res</span> = <span class="ruby-keyword kw">yield</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
|
20
|
-
<span class="ruby-keyword kw">else</span>
|
21
|
-
<span class="ruby-identifier">res</span> = <span class="ruby-identifier">unmarshall</span>(<span class="ruby-identifier">res</span>)
|
22
|
-
<span class="ruby-keyword kw">end</span>
|
23
|
-
<span class="ruby-identifier">res</span>
|
24
|
-
<span class="ruby-keyword kw">end</span>
|
25
|
-
<span class="ruby-identifier">res</span>
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/caches/cachetastic_caches_base.rb, line 19</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">all_registered_caches</span>
|
15
|
+
<span class="ruby-constant">RegisteredCaches</span>.<span class="ruby-identifier">instance</span>.<span class="ruby-identifier">list</span>
|
26
16
|
<span class="ruby-keyword kw">end</span></pre>
|
27
17
|
</body>
|
28
18
|
</html>
|
@@ -5,28 +5,16 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>inherited (Cachetastic::Caches::Base)</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/caches/cachetastic_caches_base.rb, line
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
15
|
-
<span class="ruby-
|
16
|
-
|
17
|
-
|
18
|
-
<span class="ruby-identifier">swing</span> = <span class="ruby-identifier">rand</span>(<span class="ruby-identifier">exp_swing</span>.<span class="ruby-identifier">to_i</span>)
|
19
|
-
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">rand</span>(<span class="ruby-value">2</span>)
|
20
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-value">0</span>
|
21
|
-
<span class="ruby-identifier">expiry</span> = (<span class="ruby-identifier">expiry</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">swing</span>)
|
22
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-value">1</span>
|
23
|
-
<span class="ruby-identifier">expiry</span> = (<span class="ruby-identifier">expiry</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">swing</span>)
|
24
|
-
<span class="ruby-keyword kw">end</span>
|
25
|
-
<span class="ruby-keyword kw">end</span>
|
26
|
-
<span class="ruby-identifier">store</span>.<span class="ruby-identifier">set</span>(<span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-identifier">marshall</span>(<span class="ruby-identifier">value</span>), <span class="ruby-identifier">expiry</span>.<span class="ruby-identifier">to_i</span>)
|
27
|
-
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-value str">''</span>, <span class="ruby-value str">''</span>, <span class="ruby-identifier">:expiry</span>, <span class="ruby-identifier">cache_name</span>, <span class="ruby-identifier">key</span>, <span class="ruby-identifier">expiry</span>.<span class="ruby-identifier">to_i</span>)
|
28
|
-
<span class="ruby-identifier">value</span>
|
29
|
-
<span class="ruby-keyword kw">end</span>
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/caches/cachetastic_caches_base.rb, line 23</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">inherited</span>(<span class="ruby-identifier">child</span>)
|
15
|
+
<span class="ruby-comment cmt"># puts "child: #{child.inspect}"</span>
|
16
|
+
<span class="ruby-identifier">all_registered_caches</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">child</span>.<span class="ruby-identifier">to_s</span>
|
17
|
+
<span class="ruby-comment cmt"># puts "all_registered_caches: #{all_registered_caches.inspect}"</span>
|
30
18
|
<span class="ruby-keyword kw">end</span></pre>
|
31
19
|
</body>
|
32
20
|
</html>
|
@@ -5,16 +5,24 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>get (Cachetastic::Caches::Base)</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/caches/cachetastic_caches_base.rb, line
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
15
|
-
<span class="ruby-identifier">
|
16
|
-
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/caches/cachetastic_caches_base.rb, line 29</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get</span>(<span class="ruby-identifier">key</span>)
|
15
|
+
<span class="ruby-identifier">res</span> = <span class="ruby-keyword kw">nil</span>
|
16
|
+
<span class="ruby-identifier">do_with_logging</span>(<span class="ruby-identifier">:get</span>, <span class="ruby-identifier">key</span>) <span class="ruby-keyword kw">do</span>
|
17
|
+
<span class="ruby-identifier">res</span> = <span class="ruby-identifier">store</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_s</span>)
|
18
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">res</span>.<span class="ruby-identifier">nil?</span>
|
19
|
+
<span class="ruby-identifier">res</span> = <span class="ruby-keyword kw">yield</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
|
20
|
+
<span class="ruby-keyword kw">else</span>
|
21
|
+
<span class="ruby-identifier">res</span> = <span class="ruby-identifier">unmarshall</span>(<span class="ruby-identifier">res</span>)
|
22
|
+
<span class="ruby-keyword kw">end</span>
|
23
|
+
<span class="ruby-identifier">res</span>
|
17
24
|
<span class="ruby-keyword kw">end</span>
|
25
|
+
<span class="ruby-identifier">res</span>
|
18
26
|
<span class="ruby-keyword kw">end</span></pre>
|
19
27
|
</body>
|
20
28
|
</html>
|
@@ -5,15 +5,28 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>set (Cachetastic::Caches::Base)</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/caches/cachetastic_caches_base.rb, line
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
15
|
-
<span class="ruby-identifier">
|
16
|
-
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/caches/cachetastic_caches_base.rb, line 43</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set</span>(<span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span>, <span class="ruby-identifier">expiry</span> = (<span class="ruby-identifier">store</span>.<span class="ruby-identifier">all_options</span>[<span class="ruby-value str">"default_expiry"</span>] <span class="ruby-operator">||</span> <span class="ruby-value">0</span>))
|
15
|
+
<span class="ruby-identifier">do_with_logging</span>(<span class="ruby-identifier">:set</span>, <span class="ruby-identifier">key</span>) <span class="ruby-keyword kw">do</span>
|
16
|
+
<span class="ruby-identifier">exp_swing</span> = <span class="ruby-identifier">store</span>.<span class="ruby-identifier">all_options</span>[<span class="ruby-value str">"expiry_swing"</span>]
|
17
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">exp_swing</span>
|
18
|
+
<span class="ruby-identifier">swing</span> = <span class="ruby-identifier">rand</span>(<span class="ruby-identifier">exp_swing</span>.<span class="ruby-identifier">to_i</span>)
|
19
|
+
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">rand</span>(<span class="ruby-value">2</span>)
|
20
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-value">0</span>
|
21
|
+
<span class="ruby-identifier">expiry</span> = (<span class="ruby-identifier">expiry</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">swing</span>)
|
22
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-value">1</span>
|
23
|
+
<span class="ruby-identifier">expiry</span> = (<span class="ruby-identifier">expiry</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">swing</span>)
|
24
|
+
<span class="ruby-keyword kw">end</span>
|
25
|
+
<span class="ruby-keyword kw">end</span>
|
26
|
+
<span class="ruby-identifier">store</span>.<span class="ruby-identifier">set</span>(<span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-identifier">marshall</span>(<span class="ruby-identifier">value</span>), <span class="ruby-identifier">expiry</span>.<span class="ruby-identifier">to_i</span>)
|
27
|
+
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-value str">''</span>, <span class="ruby-value str">''</span>, <span class="ruby-identifier">:expiry</span>, <span class="ruby-identifier">cache_name</span>, <span class="ruby-identifier">key</span>, <span class="ruby-identifier">expiry</span>.<span class="ruby-identifier">to_i</span>)
|
28
|
+
<span class="ruby-identifier">value</span>
|
29
|
+
<span class="ruby-keyword kw">end</span>
|
17
30
|
<span class="ruby-keyword kw">end</span></pre>
|
18
31
|
</body>
|
19
32
|
</html>
|
@@ -5,14 +5,16 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>delete (Cachetastic::Caches::Base)</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/caches/cachetastic_caches_base.rb, line
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
15
|
-
<span class="ruby-
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/caches/cachetastic_caches_base.rb, line 63</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete</span>(<span class="ruby-identifier">key</span>, <span class="ruby-identifier">delay</span> = <span class="ruby-value">0</span>)
|
15
|
+
<span class="ruby-identifier">do_with_logging</span>(<span class="ruby-identifier">:delete</span>, <span class="ruby-identifier">key</span>) <span class="ruby-keyword kw">do</span>
|
16
|
+
<span class="ruby-identifier">store</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-identifier">delay</span>)
|
17
|
+
<span class="ruby-keyword kw">end</span>
|
16
18
|
<span class="ruby-keyword kw">end</span></pre>
|
17
19
|
</body>
|
18
20
|
</html>
|
@@ -5,14 +5,15 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>expire_all (Cachetastic::Caches::Base)</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/caches/cachetastic_caches_base.rb, line
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
15
|
-
<span class="ruby-identifier">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/caches/cachetastic_caches_base.rb, line 69</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">expire_all</span>
|
15
|
+
<span class="ruby-identifier">store</span>.<span class="ruby-identifier">expire_all</span>
|
16
|
+
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span>(<span class="ruby-value str">''</span>, <span class="ruby-value str">''</span>, <span class="ruby-identifier">:expired</span>, <span class="ruby-identifier">cache_name</span>)
|
16
17
|
<span class="ruby-keyword kw">end</span></pre>
|
17
18
|
</body>
|
18
19
|
</html>
|
@@ -5,14 +5,14 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>populate_all (Cachetastic::Caches::Base)</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/caches/cachetastic_caches_base.rb, line
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
15
|
-
<span class="ruby-identifier">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/caches/cachetastic_caches_base.rb, line 74</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">populate_all</span>
|
15
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">MethodNotImplemented</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">"populate_all"</span>)
|
16
16
|
<span class="ruby-keyword kw">end</span></pre>
|
17
17
|
</body>
|
18
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>stats (Cachetastic::Caches::Base)</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/caches/cachetastic_caches_base.rb, line 78</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stats</span>
|
15
|
+
<span class="ruby-identifier">store</span>.<span class="ruby-identifier">stats</span>
|
16
|
+
<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>cache_name (Cachetastic::Caches::Base)</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/caches/cachetastic_caches_base.rb, line 82</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cache_name</span>
|
15
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">name</span>.<span class="ruby-identifier">methodize</span>
|
16
|
+
<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>store (Cachetastic::Caches::Base)</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/caches/cachetastic_caches_base.rb, line 86</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store</span>
|
15
|
+
<span class="ruby-identifier">cache_conn_instance</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">cache_name</span>)
|
16
|
+
<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>logger (Cachetastic::Caches::Base)</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/caches/cachetastic_caches_base.rb, line 90</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">logger</span>
|
15
|
+
<span class="ruby-identifier">store</span>.<span class="ruby-identifier">logger</span>
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -92,8 +92,8 @@ This class caches store objects for each cache in the system.
|
|
92
92
|
<h3 class="section-bar">Methods</h3>
|
93
93
|
|
94
94
|
<div class="name-list">
|
95
|
-
<a href="#
|
96
|
-
<a href="#
|
95
|
+
<a href="#M000046">get</a>
|
96
|
+
<a href="#M000045">new</a>
|
97
97
|
</div>
|
98
98
|
</div>
|
99
99
|
|
@@ -135,12 +135,12 @@ This class caches store objects for each cache in the system.
|
|
135
135
|
<div id="methods">
|
136
136
|
<h3 class="section-bar">Public Class methods</h3>
|
137
137
|
|
138
|
-
<div id="method-
|
139
|
-
<a name="
|
138
|
+
<div id="method-M000045" class="method-detail">
|
139
|
+
<a name="M000045"></a>
|
140
140
|
|
141
141
|
<div class="method-heading">
|
142
|
-
<a href="Connection.src/
|
143
|
-
onclick="popupCode('Connection.src/
|
142
|
+
<a href="Connection.src/M000045.html" target="Code" class="method-signature"
|
143
|
+
onclick="popupCode('Connection.src/M000045.html');return false;">
|
144
144
|
<span class="method-name">new</span><span class="method-args">()</span>
|
145
145
|
</a>
|
146
146
|
</div>
|
@@ -151,12 +151,12 @@ This class caches store objects for each cache in the system.
|
|
151
151
|
|
152
152
|
<h3 class="section-bar">Public Instance methods</h3>
|
153
153
|
|
154
|
-
<div id="method-
|
155
|
-
<a name="
|
154
|
+
<div id="method-M000046" class="method-detail">
|
155
|
+
<a name="M000046"></a>
|
156
156
|
|
157
157
|
<div class="method-heading">
|
158
|
-
<a href="Connection.src/
|
159
|
-
onclick="popupCode('Connection.src/
|
158
|
+
<a href="Connection.src/M000046.html" target="Code" class="method-signature"
|
159
|
+
onclick="popupCode('Connection.src/M000046.html');return false;">
|
160
160
|
<span class="method-name">get</span><span class="method-args">(name)</span>
|
161
161
|
</a>
|
162
162
|
</div>
|
@@ -165,7 +165,7 @@ This class caches store objects for each cache in the system.
|
|
165
165
|
<p>
|
166
166
|
Takes the name of the cache and returns back the store object associated
|
167
167
|
with the cache. If the store object doesn‘t exist of the the store is
|
168
|
-
no longer valid a <a href="Connection.html#
|
168
|
+
no longer valid a <a href="Connection.html#M000045">new</a> one is created
|
169
169
|
and returned.
|
170
170
|
</p>
|
171
171
|
</div>
|
File without changes
|
File without changes
|
@@ -92,7 +92,7 @@ This class handles logging for the caches and their stores.
|
|
92
92
|
<h3 class="section-bar">Methods</h3>
|
93
93
|
|
94
94
|
<div class="name-list">
|
95
|
-
<a href="#
|
95
|
+
<a href="#M000047">new</a>
|
96
96
|
</div>
|
97
97
|
</div>
|
98
98
|
|
@@ -145,12 +145,12 @@ This class handles logging for the caches and their stores.
|
|
145
145
|
<div id="methods">
|
146
146
|
<h3 class="section-bar">Public Class methods</h3>
|
147
147
|
|
148
|
-
<div id="method-
|
149
|
-
<a name="
|
148
|
+
<div id="method-M000047" class="method-detail">
|
149
|
+
<a name="M000047"></a>
|
150
150
|
|
151
151
|
<div class="method-heading">
|
152
|
-
<a href="Logger.src/
|
153
|
-
onclick="popupCode('Logger.src/
|
152
|
+
<a href="Logger.src/M000047.html" target="Code" class="method-signature"
|
153
|
+
onclick="popupCode('Logger.src/M000047.html');return false;">
|
154
154
|
<span class="method-name">new</span><span class="method-args">(options, cache_name)</span>
|
155
155
|
</a>
|
156
156
|
</div>
|
File without changes
|
data/doc/created.rid
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
Thu, 10 Jan 2008 16:34:40 -0500
|
@@ -56,7 +56,7 @@
|
|
56
56
|
</tr>
|
57
57
|
<tr class="top-aligned-row">
|
58
58
|
<td><strong>Last Update:</strong></td>
|
59
|
-
<td>
|
59
|
+
<td>Thu Jan 10 16:34:23 -0500 2008</td>
|
60
60
|
</tr>
|
61
61
|
</table>
|
62
62
|
</div>
|
@@ -69,6 +69,13 @@
|
|
69
69
|
<div id="contextContent">
|
70
70
|
|
71
71
|
|
72
|
+
<div id="requires-list">
|
73
|
+
<h3 class="section-bar">Required files</h3>
|
74
|
+
|
75
|
+
<div class="name-list">
|
76
|
+
singleton
|
77
|
+
</div>
|
78
|
+
</div>
|
72
79
|
|
73
80
|
</div>
|
74
81
|
|
data/doc/fr_class_index.html
CHANGED
@@ -26,6 +26,7 @@
|
|
26
26
|
<a href="classes/Cachetastic/Caches.html">Cachetastic::Caches</a><br />
|
27
27
|
<a href="classes/Cachetastic/Caches/ActiveRecord.html">Cachetastic::Caches::ActiveRecord</a><br />
|
28
28
|
<a href="classes/Cachetastic/Caches/Base.html">Cachetastic::Caches::Base</a><br />
|
29
|
+
<a href="classes/Cachetastic/Caches/Base/RegisteredCaches.html">Cachetastic::Caches::Base::RegisteredCaches</a><br />
|
29
30
|
<a href="classes/Cachetastic/Caches/PageCache.html">Cachetastic::Caches::PageCache</a><br />
|
30
31
|
<a href="classes/Cachetastic/Caches/RailsSessionCache.html">Cachetastic::Caches::RailsSessionCache</a><br />
|
31
32
|
<a href="classes/Cachetastic/Connection.html">Cachetastic::Connection</a><br />
|
data/doc/fr_method_index.html
CHANGED
@@ -20,48 +20,53 @@
|
|
20
20
|
<div id="index">
|
21
21
|
<h1 class="section-bar">Methods</h1>
|
22
22
|
<div id="index-entries">
|
23
|
+
<a href="classes/Cachetastic/Caches/Base.html#M000033">all_registered_caches (Cachetastic::Caches::Base)</a><br />
|
23
24
|
<a href="classes/Cachetastic/Helpers/ActiveRecord.html#M000007">cache (Cachetastic::Helpers::ActiveRecord)</a><br />
|
24
25
|
<a href="classes/Cachetastic/Helpers/ActiveRecord.html#M000006">cache_class (Cachetastic::Helpers::ActiveRecord)</a><br />
|
25
|
-
<a href="classes/Cachetastic/Caches/Base.html#
|
26
|
+
<a href="classes/Cachetastic/Caches/Base.html#M000041">cache_name (Cachetastic::Caches::Base)</a><br />
|
26
27
|
<a href="classes/ActiveRecord/Base.html#M000004">cache_self (ActiveRecord::Base)</a><br />
|
27
28
|
<a href="classes/Cachetastic/Stores/Base.html#M000031">configure (Cachetastic::Stores::Base)</a><br />
|
28
29
|
<a href="classes/Cachetastic/Stores/Base.html#M000030">debug? (Cachetastic::Stores::Base)</a><br />
|
29
|
-
<a href="classes/Cachetastic/Caches/Base.html#
|
30
|
+
<a href="classes/Cachetastic/Caches/Base.html#M000037">delete (Cachetastic::Caches::Base)</a><br />
|
30
31
|
<a href="classes/Cachetastic/Stores/LocalMemory.html#M000025">delete (Cachetastic::Stores::LocalMemory)</a><br />
|
31
32
|
<a href="classes/Cachetastic/Stores/Memcache.html#M000011">delete (Cachetastic::Stores::Memcache)</a><br />
|
32
33
|
<a href="classes/ActiveRecord/Base.html#M000002">delete_from_cache (ActiveRecord::Base)</a><br />
|
34
|
+
<a href="classes/Cachetastic/Helpers/ActiveRecord.html#M000008">expire_all (Cachetastic::Helpers::ActiveRecord)</a><br />
|
35
|
+
<a href="classes/Cachetastic/Caches/Base.html#M000038">expire_all (Cachetastic::Caches::Base)</a><br />
|
33
36
|
<a href="classes/Cachetastic/Stores/LocalMemory.html#M000022">expire_all (Cachetastic::Stores::LocalMemory)</a><br />
|
34
|
-
<a href="classes/Cachetastic/Caches/Base.html#M000036">expire_all (Cachetastic::Caches::Base)</a><br />
|
35
37
|
<a href="classes/Cachetastic/Stores/Memcache.html#M000013">expire_all (Cachetastic::Stores::Memcache)</a><br />
|
36
|
-
<a href="classes/Cachetastic/
|
38
|
+
<a href="classes/Cachetastic/Connection.html#M000046">get (Cachetastic::Connection)</a><br />
|
37
39
|
<a href="classes/Cachetastic/Stores/Memcache.html#M000012">get (Cachetastic::Stores::Memcache)</a><br />
|
38
|
-
<a href="classes/Cachetastic/Caches/Base.html#M000033">get (Cachetastic::Caches::Base)</a><br />
|
39
|
-
<a href="classes/Cachetastic/Connection.html#M000041">get (Cachetastic::Connection)</a><br />
|
40
40
|
<a href="classes/Cachetastic/Stores/LocalMemory.html#M000023">get (Cachetastic::Stores::LocalMemory)</a><br />
|
41
|
+
<a href="classes/Cachetastic/Caches/Base.html#M000035">get (Cachetastic::Caches::Base)</a><br />
|
41
42
|
<a href="classes/ActiveRecord/Base.html#M000001">get_from_cache (ActiveRecord::Base)</a><br />
|
42
43
|
<a href="classes/Cachetastic/Stores/Base.html#M000032">get_options (Cachetastic::Stores::Base)</a><br />
|
43
44
|
<a href="classes/Cachetastic/Stores/Memcache.html#M000019">get_version (Cachetastic::Stores::Memcache)</a><br />
|
44
45
|
<a href="classes/Cachetastic/Stores/Memcache.html#M000018">increment_version (Cachetastic::Stores::Memcache)</a><br />
|
46
|
+
<a href="classes/Cachetastic/Caches/Base.html#M000034">inherited (Cachetastic::Caches::Base)</a><br />
|
45
47
|
<a href="classes/Cachetastic/Stores/Memcache.html#M000014">inspect (Cachetastic::Stores::Memcache)</a><br />
|
46
|
-
<a href="classes/Cachetastic/Caches/Base.html#
|
48
|
+
<a href="classes/Cachetastic/Caches/Base.html#M000043">logger (Cachetastic::Caches::Base)</a><br />
|
47
49
|
<a href="classes/Cachetastic/Stores/Memcache.html#M000015">namespace (Cachetastic::Stores::Memcache)</a><br />
|
48
|
-
<a href="classes/Cachetastic/Stores/LocalMemory/StoreObject.html#M000026">new (Cachetastic::Stores::LocalMemory::StoreObject)</a><br />
|
49
|
-
<a href="classes/Cachetastic/Connection.html#M000040">new (Cachetastic::Connection)</a><br />
|
50
50
|
<a href="classes/Cachetastic/Stores/Base.html#M000028">new (Cachetastic::Stores::Base)</a><br />
|
51
|
-
<a href="classes/Cachetastic/
|
51
|
+
<a href="classes/Cachetastic/Stores/LocalMemory/StoreObject.html#M000026">new (Cachetastic::Stores::LocalMemory::StoreObject)</a><br />
|
52
|
+
<a href="classes/Cachetastic/Caches/Base/RegisteredCaches.html#M000044">new (Cachetastic::Caches::Base::RegisteredCaches)</a><br />
|
53
|
+
<a href="classes/Cachetastic/Connection.html#M000045">new (Cachetastic::Connection)</a><br />
|
54
|
+
<a href="classes/Cachetastic/Logger.html#M000047">new (Cachetastic::Logger)</a><br />
|
52
55
|
<a href="classes/Cachetastic/Stores/Memcache.html#M000017">ns_versions (Cachetastic::Stores::Memcache)</a><br />
|
53
|
-
<a href="classes/Cachetastic/
|
54
|
-
<a href="classes/Cachetastic/Caches/Base.html#M000034">set (Cachetastic::Caches::Base)</a><br />
|
56
|
+
<a href="classes/Cachetastic/Caches/Base.html#M000039">populate_all (Cachetastic::Caches::Base)</a><br />
|
55
57
|
<a href="classes/Cachetastic/Stores/Memcache.html#M000010">set (Cachetastic::Stores::Memcache)</a><br />
|
58
|
+
<a href="classes/Cachetastic/Caches/Base.html#M000036">set (Cachetastic::Caches::Base)</a><br />
|
59
|
+
<a href="classes/Cachetastic/Stores/LocalMemory.html#M000024">set (Cachetastic::Stores::LocalMemory)</a><br />
|
56
60
|
<a href="classes/ActiveRecord/Base.html#M000003">set_into_cache (ActiveRecord::Base)</a><br />
|
57
|
-
<a href="classes/Cachetastic/Stores/Memcache.html#M000009">setup (Cachetastic::Stores::Memcache)</a><br />
|
58
61
|
<a href="classes/Cachetastic/Stores/LocalMemory.html#M000021">setup (Cachetastic::Stores::LocalMemory)</a><br />
|
62
|
+
<a href="classes/Cachetastic/Stores/Memcache.html#M000009">setup (Cachetastic::Stores::Memcache)</a><br />
|
59
63
|
<a href="classes/Cachetastic/Stores/LocalMemory/StoreObject.html#M000027">size (Cachetastic::Stores::LocalMemory::StoreObject)</a><br />
|
60
|
-
<a href="classes/Cachetastic/Caches/Base.html#
|
64
|
+
<a href="classes/Cachetastic/Caches/Base.html#M000040">stats (Cachetastic::Caches::Base)</a><br />
|
65
|
+
<a href="classes/Cachetastic/Caches/Base.html#M000042">store (Cachetastic::Caches::Base)</a><br />
|
61
66
|
<a href="classes/ActiveRecord/Base.html#M000005">uncache_self (ActiveRecord::Base)</a><br />
|
62
67
|
<a href="classes/Cachetastic/Stores/Memcache.html#M000016">valid? (Cachetastic::Stores::Memcache)</a><br />
|
63
|
-
<a href="classes/Cachetastic/Stores/Base.html#M000029">valid? (Cachetastic::Stores::Base)</a><br />
|
64
68
|
<a href="classes/Cachetastic/Stores/LocalMemory.html#M000020">valid? (Cachetastic::Stores::LocalMemory)</a><br />
|
69
|
+
<a href="classes/Cachetastic/Stores/Base.html#M000029">valid? (Cachetastic::Stores::Base)</a><br />
|
65
70
|
</div>
|
66
71
|
</div>
|
67
72
|
</body>
|
@@ -1,9 +1,31 @@
|
|
1
|
+
require 'singleton'
|
1
2
|
class Cachetastic::Caches::Base
|
2
3
|
|
4
|
+
class RegisteredCaches
|
5
|
+
include Singleton
|
6
|
+
|
7
|
+
attr_reader :list
|
8
|
+
|
9
|
+
def initialize
|
10
|
+
@list = []
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
14
|
+
|
3
15
|
# everything is done at the class level. there won't be any 'instances of it'
|
4
16
|
# using class << self means we don't have to prefix each method with 'self.'
|
5
17
|
class << self
|
6
18
|
|
19
|
+
def all_registered_caches
|
20
|
+
RegisteredCaches.instance.list
|
21
|
+
end
|
22
|
+
|
23
|
+
def inherited(child)
|
24
|
+
# puts "child: #{child.inspect}"
|
25
|
+
all_registered_caches << child.to_s
|
26
|
+
# puts "all_registered_caches: #{all_registered_caches.inspect}"
|
27
|
+
end
|
28
|
+
|
7
29
|
def get(key)
|
8
30
|
res = nil
|
9
31
|
do_with_logging(:get, key) do
|
@@ -49,6 +71,14 @@ class Cachetastic::Caches::Base
|
|
49
71
|
logger.info('', '', :expired, cache_name)
|
50
72
|
end
|
51
73
|
|
74
|
+
def populate_all
|
75
|
+
raise MethodNotImplemented.new("populate_all")
|
76
|
+
end
|
77
|
+
|
78
|
+
def stats
|
79
|
+
store.stats
|
80
|
+
end
|
81
|
+
|
52
82
|
def cache_name
|
53
83
|
self.name.methodize
|
54
84
|
end
|
@@ -21,7 +21,7 @@ class Cachetastic::Stores::Base
|
|
21
21
|
false
|
22
22
|
end
|
23
23
|
|
24
|
-
[:setup, :set, :get, :delete, :expire_all].each do |meth|
|
24
|
+
[:setup, :set, :get, :delete, :expire_all, :stats].each do |meth|
|
25
25
|
define_method(meth) do |*args|
|
26
26
|
raise MethodNotImplemented.new(meth)
|
27
27
|
end
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
|
|
3
3
|
specification_version: 1
|
4
4
|
name: cachetastic
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.
|
7
|
-
date: 2008-01-
|
6
|
+
version: 1.1.3
|
7
|
+
date: 2008-01-10 00:00:00 -05:00
|
8
8
|
summary: cachetastic
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -40,6 +40,9 @@ files:
|
|
40
40
|
- doc/classes/ActiveRecord/Base.src/M000005.html
|
41
41
|
- doc/classes/ActiveRecord.html
|
42
42
|
- doc/classes/Cachetastic/Caches/ActiveRecord.html
|
43
|
+
- doc/classes/Cachetastic/Caches/Base/RegisteredCaches.html
|
44
|
+
- doc/classes/Cachetastic/Caches/Base/RegisteredCaches.src
|
45
|
+
- doc/classes/Cachetastic/Caches/Base/RegisteredCaches.src/M000044.html
|
43
46
|
- doc/classes/Cachetastic/Caches/Base.html
|
44
47
|
- doc/classes/Cachetastic/Caches/Base.src
|
45
48
|
- doc/classes/Cachetastic/Caches/Base.src/M000033.html
|
@@ -49,13 +52,17 @@ files:
|
|
49
52
|
- doc/classes/Cachetastic/Caches/Base.src/M000037.html
|
50
53
|
- doc/classes/Cachetastic/Caches/Base.src/M000038.html
|
51
54
|
- doc/classes/Cachetastic/Caches/Base.src/M000039.html
|
55
|
+
- doc/classes/Cachetastic/Caches/Base.src/M000040.html
|
56
|
+
- doc/classes/Cachetastic/Caches/Base.src/M000041.html
|
57
|
+
- doc/classes/Cachetastic/Caches/Base.src/M000042.html
|
58
|
+
- doc/classes/Cachetastic/Caches/Base.src/M000043.html
|
52
59
|
- doc/classes/Cachetastic/Caches/PageCache.html
|
53
60
|
- doc/classes/Cachetastic/Caches/RailsSessionCache.html
|
54
61
|
- doc/classes/Cachetastic/Caches.html
|
55
62
|
- doc/classes/Cachetastic/Connection.html
|
56
63
|
- doc/classes/Cachetastic/Connection.src
|
57
|
-
- doc/classes/Cachetastic/Connection.src/
|
58
|
-
- doc/classes/Cachetastic/Connection.src/
|
64
|
+
- doc/classes/Cachetastic/Connection.src/M000045.html
|
65
|
+
- doc/classes/Cachetastic/Connection.src/M000046.html
|
59
66
|
- doc/classes/Cachetastic/Helpers/ActiveRecord.html
|
60
67
|
- doc/classes/Cachetastic/Helpers/ActiveRecord.src
|
61
68
|
- doc/classes/Cachetastic/Helpers/ActiveRecord.src/M000006.html
|
@@ -64,7 +71,7 @@ files:
|
|
64
71
|
- doc/classes/Cachetastic/Helpers.html
|
65
72
|
- doc/classes/Cachetastic/Logger.html
|
66
73
|
- doc/classes/Cachetastic/Logger.src
|
67
|
-
- doc/classes/Cachetastic/Logger.src/
|
74
|
+
- doc/classes/Cachetastic/Logger.src/M000047.html
|
68
75
|
- doc/classes/Cachetastic/Stores/Base.html
|
69
76
|
- doc/classes/Cachetastic/Stores/Base.src
|
70
77
|
- doc/classes/Cachetastic/Stores/Base.src/M000028.html
|