cachetastic 1.7.4 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README +31 -44
- data/bin/cachetastic_drb_server +115 -0
- data/doc/classes/ActiveRecord/Base.html +16 -16
- data/doc/classes/CGI/Session/CachetasticStore.html +2 -2
- data/doc/classes/Cachetastic/Adapters/Base.html +74 -67
- data/doc/classes/Cachetastic/Adapters/Drb.html +11 -11
- data/doc/classes/Cachetastic/Adapters/File.html +5 -5
- data/doc/classes/Cachetastic/Adapters/FileBase.html +45 -45
- data/doc/classes/Cachetastic/Adapters/HtmlFile.html +23 -23
- data/doc/classes/Cachetastic/Adapters/LocalMemory.html +51 -51
- data/doc/classes/Cachetastic/Adapters/Memcache.html +89 -89
- data/doc/classes/Cachetastic/Cacheable.html +22 -22
- data/doc/classes/Cachetastic/Cacheable/ClassAndInstanceMethods.html +23 -23
- data/doc/classes/Cachetastic/Cacheable/ClassOnlyMethods.html +23 -23
- data/doc/classes/Cachetastic/Caches/Base.html +170 -199
- data/doc/classes/Cachetastic/Caches/Base/RegisteredCaches.html +9 -9
- data/doc/classes/Cachetastic/Caches/MackSessionCache.html +2 -2
- data/doc/classes/Cachetastic/Caches/PageCache.html +2 -2
- data/doc/classes/Cachetastic/Caches/RailsSessionCache.html +9 -9
- data/doc/classes/Cachetastic/Connection.html +5 -5
- data/doc/classes/Cachetastic/Errors/UnsupportedAdapter.html +9 -9
- data/doc/classes/Cachetastic/Logger.html +23 -24
- data/doc/classes/Object.html +41 -3
- data/doc/created.rid +1 -1
- data/doc/files/README.html +33 -52
- data/doc/files/lib/{adapters/cachetastic_adapters_base_rb.html → cachetastic/adapters/base_rb.html} +6 -6
- data/doc/files/lib/{adapters/cachetastic_adapters_drb_rb.html → cachetastic/adapters/drb_rb.html} +5 -5
- data/doc/files/lib/{adapters/cachetastic_adapters_file_base_rb.html → cachetastic/adapters/file_base_rb.html} +5 -5
- data/doc/files/lib/{adapters/cachetastic_adapters_file_rb.html → cachetastic/adapters/file_rb.html} +5 -5
- data/doc/files/lib/{adapters/cachetastic_adapters_html_file_rb.html → cachetastic/adapters/html_file_rb.html} +5 -5
- data/doc/files/lib/{adapters/cachetastic_adapters_local_memory_rb.html → cachetastic/adapters/local_memory_rb.html} +5 -5
- data/doc/files/lib/{adapters/cachetastic_adapters_memcache_rb.html → cachetastic/adapters/memcache_rb.html} +5 -5
- data/doc/files/lib/{cachetastic_cacheable_rb.html → cachetastic/adapters/store_object_rb.html} +5 -5
- data/doc/files/lib/{ruby_extensions/object_rb.html → cachetastic/cacheable_rb.html} +4 -4
- data/doc/files/lib/{caches/cachetastic_caches_base_rb.html → cachetastic/caches/base_rb.html} +5 -5
- data/doc/files/lib/{cachetastic_connection_rb.html → cachetastic/caches/mack_session_cache_rb.html} +6 -6
- data/doc/files/lib/{caches/cachetastic_caches_page_cache_rb.html → cachetastic/caches/page_cache_rb.html} +5 -5
- data/doc/files/lib/{caches/cachetastic_caches_rails_session_cache_rb.html → cachetastic/caches/rails_session_cache_rb.html} +5 -5
- data/doc/files/lib/{caches/cachetastic_caches_mack_session_cache_rb.html → cachetastic/connection_rb.html} +5 -5
- data/doc/files/lib/{adapters/cachetastic_adapters_store_object_rb.html → cachetastic/errors/unsupported_adapter_rb.html} +5 -5
- data/doc/files/lib/{cachetastic_logger_rb.html → cachetastic/logger_rb.html} +5 -5
- data/doc/files/lib/{rails_extensions/cachetastic_active_record_base_rb.html → cachetastic/rails_extensions/active_record_base_rb.html} +5 -5
- data/doc/files/lib/{rails_extensions/cgi_session_cachetastic_store_rb.html → cachetastic/rails_extensions/cgi_session_store_rb.html} +5 -5
- data/doc/files/lib/cachetastic/ruby_extensions/object_rb.html +101 -0
- data/doc/files/lib/cachetastic_rb.html +34 -53
- data/doc/fr_file_index.html +19 -19
- data/doc/fr_method_index.html +63 -62
- data/lib/cachetastic.rb +35 -22
- data/lib/{adapters/cachetastic_adapters_base.rb → cachetastic/adapters/base.rb} +23 -30
- data/lib/{adapters/cachetastic_adapters_drb.rb → cachetastic/adapters/drb.rb} +2 -2
- data/lib/{adapters/cachetastic_adapters_file.rb → cachetastic/adapters/file.rb} +0 -0
- data/lib/{adapters/cachetastic_adapters_file_base.rb → cachetastic/adapters/file_base.rb} +1 -1
- data/lib/{adapters/cachetastic_adapters_html_file.rb → cachetastic/adapters/html_file.rb} +0 -0
- data/lib/{adapters/cachetastic_adapters_local_memory.rb → cachetastic/adapters/local_memory.rb} +0 -0
- data/lib/{adapters/cachetastic_adapters_memcache.rb → cachetastic/adapters/memcache.rb} +3 -3
- data/lib/{adapters/cachetastic_adapters_store_object.rb → cachetastic/adapters/store_object.rb} +0 -0
- data/lib/{cachetastic_cacheable.rb → cachetastic/cacheable.rb} +0 -0
- data/lib/{caches/cachetastic_caches_base.rb → cachetastic/caches/base.rb} +11 -13
- data/lib/{caches/cachetastic_caches_mack_session_cache.rb → cachetastic/caches/mack_session_cache.rb} +0 -0
- data/lib/{caches/cachetastic_caches_page_cache.rb → cachetastic/caches/page_cache.rb} +0 -0
- data/lib/{caches/cachetastic_caches_rails_session_cache.rb → cachetastic/caches/rails_session_cache.rb} +0 -0
- data/lib/{cachetastic_connection.rb → cachetastic/connection.rb} +1 -1
- data/lib/{errors/cachetastic_errors_unsupported_adapter.rb → cachetastic/errors/unsupported_adapter.rb} +0 -0
- data/lib/cachetastic/logger.rb +49 -0
- data/lib/{rails_extensions/cachetastic_active_record_base.rb → cachetastic/rails_extensions/active_record_base.rb} +0 -0
- data/lib/{rails_extensions/cgi_session_cachetastic_store.rb → cachetastic/rails_extensions/cgi_session_store.rb} +0 -0
- data/lib/{ruby_extensions → cachetastic/ruby_extensions}/object.rb +0 -0
- data/test/config.rb +30 -0
- data/test/drb_adapter_test.rb +14 -0
- data/test/memcache_adapter_test.rb +14 -0
- data/test/test_helper.rb +8 -22
- metadata +58 -47
- data/doc/files/lib/errors/cachetastic_errors_unsupported_adapter_rb.html +0 -101
- data/lib/cachetastic_logger.rb +0 -44
- data/test/config.yml +0 -71
- data/test/data_mapper_test.rb +0 -9
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
<tr class="top-aligned-row">
|
|
56
56
|
<td><strong>In:</strong></td>
|
|
57
57
|
<td>
|
|
58
|
-
<a href="../../../files/lib/adapters/
|
|
59
|
-
lib/adapters/
|
|
58
|
+
<a href="../../../files/lib/cachetastic/adapters/drb_rb.html">
|
|
59
|
+
lib/cachetastic/adapters/drb.rb
|
|
60
60
|
</a>
|
|
61
61
|
<br />
|
|
62
62
|
</td>
|
|
@@ -157,7 +157,7 @@ configuration for this should look something like this:
|
|
|
157
157
|
onclick="toggleCode('M000042-source');return false;">[Source]</a></p>
|
|
158
158
|
<div class="method-source-code" id="M000042-source">
|
|
159
159
|
<pre>
|
|
160
|
-
<span class="ruby-comment cmt"># File lib/adapters/
|
|
160
|
+
<span class="ruby-comment cmt"># File lib/cachetastic/adapters/drb.rb, line 38</span>
|
|
161
161
|
38: <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>)
|
|
162
162
|
39: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">drb_store</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">name</span>, <span class="ruby-identifier">key</span>)
|
|
163
163
|
40: <span class="ruby-keyword kw">end</span>
|
|
@@ -180,7 +180,7 @@ configuration for this should look something like this:
|
|
|
180
180
|
onclick="toggleCode('M000039-source');return false;">[Source]</a></p>
|
|
181
181
|
<div class="method-source-code" id="M000039-source">
|
|
182
182
|
<pre>
|
|
183
|
-
<span class="ruby-comment cmt"># File lib/adapters/
|
|
183
|
+
<span class="ruby-comment cmt"># File lib/cachetastic/adapters/drb.rb, line 25</span>
|
|
184
184
|
25: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">expire_all</span>
|
|
185
185
|
26: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">drb_store</span>.<span class="ruby-identifier">expire_all</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">name</span>)
|
|
186
186
|
27: <span class="ruby-keyword kw">end</span>
|
|
@@ -206,7 +206,7 @@ See <a href="Base.html">Cachetastic::Adapters::Base</a>
|
|
|
206
206
|
onclick="toggleCode('M000040-source');return false;">[Source]</a></p>
|
|
207
207
|
<div class="method-source-code" id="M000040-source">
|
|
208
208
|
<pre>
|
|
209
|
-
<span class="ruby-comment cmt"># File lib/adapters/
|
|
209
|
+
<span class="ruby-comment cmt"># File lib/cachetastic/adapters/drb.rb, line 30</span>
|
|
210
210
|
30: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get</span>(<span class="ruby-identifier">key</span>)
|
|
211
211
|
31: <span class="ruby-constant">Cachetastic</span><span class="ruby-operator">::</span><span class="ruby-constant">Caches</span><span class="ruby-operator">::</span><span class="ruby-constant">Base</span>.<span class="ruby-identifier">unmarshall</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">drb_store</span>.<span class="ruby-identifier">get</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">name</span>, <span class="ruby-identifier">key</span>))
|
|
212
212
|
32: <span class="ruby-keyword kw">end</span>
|
|
@@ -229,7 +229,7 @@ See <a href="Base.html">Cachetastic::Adapters::Base</a>
|
|
|
229
229
|
onclick="toggleCode('M000041-source');return false;">[Source]</a></p>
|
|
230
230
|
<div class="method-source-code" id="M000041-source">
|
|
231
231
|
<pre>
|
|
232
|
-
<span class="ruby-comment cmt"># File lib/adapters/
|
|
232
|
+
<span class="ruby-comment cmt"># File lib/cachetastic/adapters/drb.rb, line 34</span>
|
|
233
233
|
34: <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-value">0</span>)
|
|
234
234
|
35: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">drb_store</span>.<span class="ruby-identifier">set</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">name</span>, <span class="ruby-identifier">key</span>, <span class="ruby-constant">Cachetastic</span><span class="ruby-operator">::</span><span class="ruby-constant">Caches</span><span class="ruby-operator">::</span><span class="ruby-constant">Base</span>.<span class="ruby-identifier">marshall</span>(<span class="ruby-identifier">value</span>), <span class="ruby-identifier">expiry</span>)
|
|
235
235
|
36: <span class="ruby-keyword kw">end</span>
|
|
@@ -252,10 +252,10 @@ See <a href="Base.html">Cachetastic::Adapters::Base</a>
|
|
|
252
252
|
onclick="toggleCode('M000038-source');return false;">[Source]</a></p>
|
|
253
253
|
<div class="method-source-code" id="M000038-source">
|
|
254
254
|
<pre>
|
|
255
|
-
<span class="ruby-comment cmt"># File lib/adapters/
|
|
255
|
+
<span class="ruby-comment cmt"># File lib/cachetastic/adapters/drb.rb, line 20</span>
|
|
256
256
|
20: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setup</span>
|
|
257
|
-
21: <span class="ruby-
|
|
258
|
-
22: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">drb_store</span> = <span class="ruby-constant">DRbObject</span>.<span class="ruby-identifier">new_with_uri</span>(<span class="ruby-
|
|
257
|
+
21: <span class="ruby-comment cmt"># self.all_options["marshall_method"] = "ruby"</span>
|
|
258
|
+
22: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">drb_store</span> = <span class="ruby-constant">DRbObject</span>.<span class="ruby-identifier">new_with_uri</span>(<span class="ruby-identifier">configuration</span>.<span class="ruby-identifier">servers</span>)
|
|
259
259
|
23: <span class="ruby-keyword kw">end</span>
|
|
260
260
|
</pre>
|
|
261
261
|
</div>
|
|
@@ -276,7 +276,7 @@ See <a href="Base.html">Cachetastic::Adapters::Base</a>
|
|
|
276
276
|
onclick="toggleCode('M000043-source');return false;">[Source]</a></p>
|
|
277
277
|
<div class="method-source-code" id="M000043-source">
|
|
278
278
|
<pre>
|
|
279
|
-
<span class="ruby-comment cmt"># File lib/adapters/
|
|
279
|
+
<span class="ruby-comment cmt"># File lib/cachetastic/adapters/drb.rb, line 42</span>
|
|
280
280
|
42: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stats</span>
|
|
281
281
|
43: <span class="ruby-keyword kw">super</span>
|
|
282
282
|
44: <span class="ruby-keyword kw">begin</span>
|
|
@@ -304,7 +304,7 @@ See <a href="Base.html">Cachetastic::Adapters::Base</a>
|
|
|
304
304
|
onclick="toggleCode('M000037-source');return false;">[Source]</a></p>
|
|
305
305
|
<div class="method-source-code" id="M000037-source">
|
|
306
306
|
<pre>
|
|
307
|
-
<span class="ruby-comment cmt"># File lib/adapters/
|
|
307
|
+
<span class="ruby-comment cmt"># File lib/cachetastic/adapters/drb.rb, line 12</span>
|
|
308
308
|
12: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">valid?</span>
|
|
309
309
|
13: <span class="ruby-keyword kw">begin</span>
|
|
310
310
|
14: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">drb_store</span>.<span class="ruby-identifier">ping</span>
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
<tr class="top-aligned-row">
|
|
56
56
|
<td><strong>In:</strong></td>
|
|
57
57
|
<td>
|
|
58
|
-
<a href="../../../files/lib/adapters/
|
|
59
|
-
lib/adapters/
|
|
58
|
+
<a href="../../../files/lib/cachetastic/adapters/file_rb.html">
|
|
59
|
+
lib/cachetastic/adapters/file.rb
|
|
60
60
|
</a>
|
|
61
61
|
<br />
|
|
62
62
|
</td>
|
|
@@ -159,7 +159,7 @@ for this should look something like this:
|
|
|
159
159
|
onclick="toggleCode('M000044-source');return false;">[Source]</a></p>
|
|
160
160
|
<div class="method-source-code" id="M000044-source">
|
|
161
161
|
<pre>
|
|
162
|
-
<span class="ruby-comment cmt"># File lib/adapters/
|
|
162
|
+
<span class="ruby-comment cmt"># File lib/cachetastic/adapters/file.rb, line 16</span>
|
|
163
163
|
16: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get</span>(<span class="ruby-identifier">key</span>)
|
|
164
164
|
17: <span class="ruby-identifier">full_path</span> = <span class="ruby-identifier">full_path_from_dir</span>(<span class="ruby-identifier">get_key_directoy</span>(<span class="ruby-identifier">key</span>, <span class="ruby-keyword kw">false</span>))
|
|
165
165
|
18: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">full_path</span>)
|
|
@@ -196,7 +196,7 @@ for this should look something like this:
|
|
|
196
196
|
onclick="toggleCode('M000045-source');return false;">[Source]</a></p>
|
|
197
197
|
<div class="method-source-code" id="M000045-source">
|
|
198
198
|
<pre>
|
|
199
|
-
<span class="ruby-comment cmt"># File lib/adapters/
|
|
199
|
+
<span class="ruby-comment cmt"># File lib/cachetastic/adapters/file.rb, line 34</span>
|
|
200
200
|
34: <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-value">0</span>)
|
|
201
201
|
35: <span class="ruby-identifier">so</span> = <span class="ruby-constant">Cachetastic</span><span class="ruby-operator">::</span><span class="ruby-constant">Adapters</span><span class="ruby-operator">::</span><span class="ruby-constant">StoreObject</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-identifier">value</span>, <span class="ruby-identifier">expiry</span>)
|
|
202
202
|
36: <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">full_path_from_key</span>(<span class="ruby-identifier">key</span>), <span class="ruby-value str">"w"</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
|
|
@@ -224,7 +224,7 @@ for this should look something like this:
|
|
|
224
224
|
onclick="toggleCode('M000046-source');return false;">[Source]</a></p>
|
|
225
225
|
<div class="method-source-code" id="M000046-source">
|
|
226
226
|
<pre>
|
|
227
|
-
<span class="ruby-comment cmt"># File lib/adapters/
|
|
227
|
+
<span class="ruby-comment cmt"># File lib/cachetastic/adapters/file.rb, line 42</span>
|
|
228
228
|
42: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_file_name</span>
|
|
229
229
|
43: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">STORE_FILE_NAME</span>
|
|
230
230
|
44: <span class="ruby-keyword kw">end</span>
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
<tr class="top-aligned-row">
|
|
56
56
|
<td><strong>In:</strong></td>
|
|
57
57
|
<td>
|
|
58
|
-
<a href="../../../files/lib/adapters/
|
|
59
|
-
lib/adapters/
|
|
58
|
+
<a href="../../../files/lib/cachetastic/adapters/file_base_rb.html">
|
|
59
|
+
lib/cachetastic/adapters/file_base.rb
|
|
60
60
|
</a>
|
|
61
61
|
<br />
|
|
62
62
|
</td>
|
|
@@ -88,12 +88,12 @@
|
|
|
88
88
|
<h3 class="section-bar">Methods</h3>
|
|
89
89
|
|
|
90
90
|
<div class="name-list">
|
|
91
|
-
<a href="#
|
|
92
|
-
<a href="#
|
|
93
|
-
<a href="#
|
|
94
|
-
<a href="#
|
|
95
|
-
<a href="#
|
|
96
|
-
<a href="#
|
|
91
|
+
<a href="#M000029">delete</a>
|
|
92
|
+
<a href="#M000030">expire_all</a>
|
|
93
|
+
<a href="#M000026">setup</a>
|
|
94
|
+
<a href="#M000028">stats</a>
|
|
95
|
+
<a href="#M000031">store_file_name</a>
|
|
96
|
+
<a href="#M000027">valid?</a>
|
|
97
97
|
</div>
|
|
98
98
|
</div>
|
|
99
99
|
|
|
@@ -133,21 +133,21 @@
|
|
|
133
133
|
<div id="methods">
|
|
134
134
|
<h3 class="section-bar">Public Instance methods</h3>
|
|
135
135
|
|
|
136
|
-
<div id="method-
|
|
137
|
-
<a name="
|
|
136
|
+
<div id="method-M000029" class="method-detail">
|
|
137
|
+
<a name="M000029"></a>
|
|
138
138
|
|
|
139
139
|
<div class="method-heading">
|
|
140
|
-
<a href="#
|
|
140
|
+
<a href="#M000029" class="method-signature">
|
|
141
141
|
<span class="method-name">delete</span><span class="method-args">(key, delay = 0)</span>
|
|
142
142
|
</a>
|
|
143
143
|
</div>
|
|
144
144
|
|
|
145
145
|
<div class="method-description">
|
|
146
146
|
<p><a class="source-toggle" href="#"
|
|
147
|
-
onclick="toggleCode('
|
|
148
|
-
<div class="method-source-code" id="
|
|
147
|
+
onclick="toggleCode('M000029-source');return false;">[Source]</a></p>
|
|
148
|
+
<div class="method-source-code" id="M000029-source">
|
|
149
149
|
<pre>
|
|
150
|
-
<span class="ruby-comment cmt"># File lib/adapters/
|
|
150
|
+
<span class="ruby-comment cmt"># File lib/cachetastic/adapters/file_base.rb, line 33</span>
|
|
151
151
|
33: <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>)
|
|
152
152
|
34: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">delay</span> <span class="ruby-operator"><=</span> <span class="ruby-value">0</span>
|
|
153
153
|
35: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">rm_rf</span>(<span class="ruby-identifier">get_key_directoy</span>(<span class="ruby-identifier">key</span>), <span class="ruby-identifier">:verbose</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">debug?</span>)
|
|
@@ -163,21 +163,21 @@
|
|
|
163
163
|
</div>
|
|
164
164
|
</div>
|
|
165
165
|
|
|
166
|
-
<div id="method-
|
|
167
|
-
<a name="
|
|
166
|
+
<div id="method-M000030" class="method-detail">
|
|
167
|
+
<a name="M000030"></a>
|
|
168
168
|
|
|
169
169
|
<div class="method-heading">
|
|
170
|
-
<a href="#
|
|
170
|
+
<a href="#M000030" class="method-signature">
|
|
171
171
|
<span class="method-name">expire_all</span><span class="method-args">()</span>
|
|
172
172
|
</a>
|
|
173
173
|
</div>
|
|
174
174
|
|
|
175
175
|
<div class="method-description">
|
|
176
176
|
<p><a class="source-toggle" href="#"
|
|
177
|
-
onclick="toggleCode('
|
|
178
|
-
<div class="method-source-code" id="
|
|
177
|
+
onclick="toggleCode('M000030-source');return false;">[Source]</a></p>
|
|
178
|
+
<div class="method-source-code" id="M000030-source">
|
|
179
179
|
<pre>
|
|
180
|
-
<span class="ruby-comment cmt"># File lib/adapters/
|
|
180
|
+
<span class="ruby-comment cmt"># File lib/cachetastic/adapters/file_base.rb, line 44</span>
|
|
181
181
|
44: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">expire_all</span>
|
|
182
182
|
45: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">rm_rf</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">directory</span>, <span class="ruby-identifier">:verbose</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">debug?</span>)
|
|
183
183
|
46: <span class="ruby-identifier">setup</span>
|
|
@@ -187,23 +187,23 @@
|
|
|
187
187
|
</div>
|
|
188
188
|
</div>
|
|
189
189
|
|
|
190
|
-
<div id="method-
|
|
191
|
-
<a name="
|
|
190
|
+
<div id="method-M000026" class="method-detail">
|
|
191
|
+
<a name="M000026"></a>
|
|
192
192
|
|
|
193
193
|
<div class="method-heading">
|
|
194
|
-
<a href="#
|
|
194
|
+
<a href="#M000026" class="method-signature">
|
|
195
195
|
<span class="method-name">setup</span><span class="method-args">()</span>
|
|
196
196
|
</a>
|
|
197
197
|
</div>
|
|
198
198
|
|
|
199
199
|
<div class="method-description">
|
|
200
200
|
<p><a class="source-toggle" href="#"
|
|
201
|
-
onclick="toggleCode('
|
|
202
|
-
<div class="method-source-code" id="
|
|
201
|
+
onclick="toggleCode('M000026-source');return false;">[Source]</a></p>
|
|
202
|
+
<div class="method-source-code" id="M000026-source">
|
|
203
203
|
<pre>
|
|
204
|
-
<span class="ruby-comment cmt"># File lib/adapters/
|
|
204
|
+
<span class="ruby-comment cmt"># File lib/cachetastic/adapters/file_base.rb, line 8</span>
|
|
205
205
|
8: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setup</span>
|
|
206
|
-
9: <span class="ruby-ivar">@directory</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">
|
|
206
|
+
9: <span class="ruby-ivar">@directory</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">configuration</span>.<span class="ruby-identifier">store_options</span>.<span class="ruby-identifier">dir</span>, <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_s</span>)
|
|
207
207
|
10: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">directory</span>, <span class="ruby-identifier">:verbose</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">debug?</span>)
|
|
208
208
|
11: <span class="ruby-ivar">@hashed_keys</span> = {}
|
|
209
209
|
12: <span class="ruby-keyword kw">end</span>
|
|
@@ -212,21 +212,21 @@
|
|
|
212
212
|
</div>
|
|
213
213
|
</div>
|
|
214
214
|
|
|
215
|
-
<div id="method-
|
|
216
|
-
<a name="
|
|
215
|
+
<div id="method-M000028" class="method-detail">
|
|
216
|
+
<a name="M000028"></a>
|
|
217
217
|
|
|
218
218
|
<div class="method-heading">
|
|
219
|
-
<a href="#
|
|
219
|
+
<a href="#M000028" class="method-signature">
|
|
220
220
|
<span class="method-name">stats</span><span class="method-args">()</span>
|
|
221
221
|
</a>
|
|
222
222
|
</div>
|
|
223
223
|
|
|
224
224
|
<div class="method-description">
|
|
225
225
|
<p><a class="source-toggle" href="#"
|
|
226
|
-
onclick="toggleCode('
|
|
227
|
-
<div class="method-source-code" id="
|
|
226
|
+
onclick="toggleCode('M000028-source');return false;">[Source]</a></p>
|
|
227
|
+
<div class="method-source-code" id="M000028-source">
|
|
228
228
|
<pre>
|
|
229
|
-
<span class="ruby-comment cmt"># File lib/adapters/
|
|
229
|
+
<span class="ruby-comment cmt"># File lib/cachetastic/adapters/file_base.rb, line 18</span>
|
|
230
230
|
18: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stats</span>
|
|
231
231
|
19: <span class="ruby-keyword kw">super</span>
|
|
232
232
|
20: <span class="ruby-identifier">num_files</span> = <span class="ruby-identifier">num_directories</span> = <span class="ruby-identifier">file_size</span> = <span class="ruby-value">0</span>
|
|
@@ -246,21 +246,21 @@
|
|
|
246
246
|
</div>
|
|
247
247
|
</div>
|
|
248
248
|
|
|
249
|
-
<div id="method-
|
|
250
|
-
<a name="
|
|
249
|
+
<div id="method-M000027" class="method-detail">
|
|
250
|
+
<a name="M000027"></a>
|
|
251
251
|
|
|
252
252
|
<div class="method-heading">
|
|
253
|
-
<a href="#
|
|
253
|
+
<a href="#M000027" class="method-signature">
|
|
254
254
|
<span class="method-name">valid?</span><span class="method-args">()</span>
|
|
255
255
|
</a>
|
|
256
256
|
</div>
|
|
257
257
|
|
|
258
258
|
<div class="method-description">
|
|
259
259
|
<p><a class="source-toggle" href="#"
|
|
260
|
-
onclick="toggleCode('
|
|
261
|
-
<div class="method-source-code" id="
|
|
260
|
+
onclick="toggleCode('M000027-source');return false;">[Source]</a></p>
|
|
261
|
+
<div class="method-source-code" id="M000027-source">
|
|
262
262
|
<pre>
|
|
263
|
-
<span class="ruby-comment cmt"># File lib/adapters/
|
|
263
|
+
<span class="ruby-comment cmt"># File lib/cachetastic/adapters/file_base.rb, line 14</span>
|
|
264
264
|
14: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">valid?</span>
|
|
265
265
|
15: <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">directory</span>)
|
|
266
266
|
16: <span class="ruby-keyword kw">end</span>
|
|
@@ -271,21 +271,21 @@
|
|
|
271
271
|
|
|
272
272
|
<h3 class="section-bar">Protected Instance methods</h3>
|
|
273
273
|
|
|
274
|
-
<div id="method-
|
|
275
|
-
<a name="
|
|
274
|
+
<div id="method-M000031" class="method-detail">
|
|
275
|
+
<a name="M000031"></a>
|
|
276
276
|
|
|
277
277
|
<div class="method-heading">
|
|
278
|
-
<a href="#
|
|
278
|
+
<a href="#M000031" class="method-signature">
|
|
279
279
|
<span class="method-name">store_file_name</span><span class="method-args">()</span>
|
|
280
280
|
</a>
|
|
281
281
|
</div>
|
|
282
282
|
|
|
283
283
|
<div class="method-description">
|
|
284
284
|
<p><a class="source-toggle" href="#"
|
|
285
|
-
onclick="toggleCode('
|
|
286
|
-
<div class="method-source-code" id="
|
|
285
|
+
onclick="toggleCode('M000031-source');return false;">[Source]</a></p>
|
|
286
|
+
<div class="method-source-code" id="M000031-source">
|
|
287
287
|
<pre>
|
|
288
|
-
<span class="ruby-comment cmt"># File lib/adapters/
|
|
288
|
+
<span class="ruby-comment cmt"># File lib/cachetastic/adapters/file_base.rb, line 50</span>
|
|
289
289
|
50: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_file_name</span>
|
|
290
290
|
51: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">"cachetastic.data"</span>
|
|
291
291
|
52: <span class="ruby-keyword kw">end</span>
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
<tr class="top-aligned-row">
|
|
56
56
|
<td><strong>In:</strong></td>
|
|
57
57
|
<td>
|
|
58
|
-
<a href="../../../files/lib/adapters/
|
|
59
|
-
lib/adapters/
|
|
58
|
+
<a href="../../../files/lib/cachetastic/adapters/html_file_rb.html">
|
|
59
|
+
lib/cachetastic/adapters/html_file.rb
|
|
60
60
|
</a>
|
|
61
61
|
<br />
|
|
62
62
|
</td>
|
|
@@ -88,9 +88,9 @@
|
|
|
88
88
|
<h3 class="section-bar">Methods</h3>
|
|
89
89
|
|
|
90
90
|
<div class="name-list">
|
|
91
|
-
<a href="#
|
|
92
|
-
<a href="#
|
|
93
|
-
<a href="#
|
|
91
|
+
<a href="#M000004">get</a>
|
|
92
|
+
<a href="#M000005">set</a>
|
|
93
|
+
<a href="#M000006">store_file_name</a>
|
|
94
94
|
</div>
|
|
95
95
|
</div>
|
|
96
96
|
|
|
@@ -125,21 +125,21 @@
|
|
|
125
125
|
<div id="methods">
|
|
126
126
|
<h3 class="section-bar">Public Instance methods</h3>
|
|
127
127
|
|
|
128
|
-
<div id="method-
|
|
129
|
-
<a name="
|
|
128
|
+
<div id="method-M000004" class="method-detail">
|
|
129
|
+
<a name="M000004"></a>
|
|
130
130
|
|
|
131
131
|
<div class="method-heading">
|
|
132
|
-
<a href="#
|
|
132
|
+
<a href="#M000004" class="method-signature">
|
|
133
133
|
<span class="method-name">get</span><span class="method-args">(key)</span>
|
|
134
134
|
</a>
|
|
135
135
|
</div>
|
|
136
136
|
|
|
137
137
|
<div class="method-description">
|
|
138
138
|
<p><a class="source-toggle" href="#"
|
|
139
|
-
onclick="toggleCode('
|
|
140
|
-
<div class="method-source-code" id="
|
|
139
|
+
onclick="toggleCode('M000004-source');return false;">[Source]</a></p>
|
|
140
|
+
<div class="method-source-code" id="M000004-source">
|
|
141
141
|
<pre>
|
|
142
|
-
<span class="ruby-comment cmt"># File lib/adapters/
|
|
142
|
+
<span class="ruby-comment cmt"># File lib/cachetastic/adapters/html_file.rb, line 23</span>
|
|
143
143
|
23: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get</span>(<span class="ruby-identifier">key</span>)
|
|
144
144
|
24: <span class="ruby-identifier">full_path</span> = <span class="ruby-identifier">full_path_from_dir</span>(<span class="ruby-identifier">get_key_directoy</span>(<span class="ruby-identifier">key</span>, <span class="ruby-keyword kw">false</span>))
|
|
145
145
|
25: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">full_path</span>)
|
|
@@ -158,21 +158,21 @@
|
|
|
158
158
|
</div>
|
|
159
159
|
</div>
|
|
160
160
|
|
|
161
|
-
<div id="method-
|
|
162
|
-
<a name="
|
|
161
|
+
<div id="method-M000005" class="method-detail">
|
|
162
|
+
<a name="M000005"></a>
|
|
163
163
|
|
|
164
164
|
<div class="method-heading">
|
|
165
|
-
<a href="#
|
|
165
|
+
<a href="#M000005" class="method-signature">
|
|
166
166
|
<span class="method-name">set</span><span class="method-args">(key, value, expiry = 0)</span>
|
|
167
167
|
</a>
|
|
168
168
|
</div>
|
|
169
169
|
|
|
170
170
|
<div class="method-description">
|
|
171
171
|
<p><a class="source-toggle" href="#"
|
|
172
|
-
onclick="toggleCode('
|
|
173
|
-
<div class="method-source-code" id="
|
|
172
|
+
onclick="toggleCode('M000005-source');return false;">[Source]</a></p>
|
|
173
|
+
<div class="method-source-code" id="M000005-source">
|
|
174
174
|
<pre>
|
|
175
|
-
<span class="ruby-comment cmt"># File lib/adapters/
|
|
175
|
+
<span class="ruby-comment cmt"># File lib/cachetastic/adapters/html_file.rb, line 37</span>
|
|
176
176
|
37: <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-value">0</span>)
|
|
177
177
|
38: <span class="ruby-identifier">so</span> = <span class="ruby-constant">Cachetastic</span><span class="ruby-operator">::</span><span class="ruby-constant">Adapters</span><span class="ruby-operator">::</span><span class="ruby-constant">StoreObject</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-identifier">value</span>, <span class="ruby-identifier">expiry</span>)
|
|
178
178
|
39: <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">full_path_from_key</span>(<span class="ruby-identifier">key</span>), <span class="ruby-value str">"w"</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
|
|
@@ -186,21 +186,21 @@
|
|
|
186
186
|
|
|
187
187
|
<h3 class="section-bar">Protected Instance methods</h3>
|
|
188
188
|
|
|
189
|
-
<div id="method-
|
|
190
|
-
<a name="
|
|
189
|
+
<div id="method-M000006" class="method-detail">
|
|
190
|
+
<a name="M000006"></a>
|
|
191
191
|
|
|
192
192
|
<div class="method-heading">
|
|
193
|
-
<a href="#
|
|
193
|
+
<a href="#M000006" class="method-signature">
|
|
194
194
|
<span class="method-name">store_file_name</span><span class="method-args">()</span>
|
|
195
195
|
</a>
|
|
196
196
|
</div>
|
|
197
197
|
|
|
198
198
|
<div class="method-description">
|
|
199
199
|
<p><a class="source-toggle" href="#"
|
|
200
|
-
onclick="toggleCode('
|
|
201
|
-
<div class="method-source-code" id="
|
|
200
|
+
onclick="toggleCode('M000006-source');return false;">[Source]</a></p>
|
|
201
|
+
<div class="method-source-code" id="M000006-source">
|
|
202
202
|
<pre>
|
|
203
|
-
<span class="ruby-comment cmt"># File lib/adapters/
|
|
203
|
+
<span class="ruby-comment cmt"># File lib/cachetastic/adapters/html_file.rb, line 45</span>
|
|
204
204
|
45: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_file_name</span>
|
|
205
205
|
46: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">STORE_FILE_NAME</span>
|
|
206
206
|
47: <span class="ruby-keyword kw">end</span>
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
<tr class="top-aligned-row">
|
|
56
56
|
<td><strong>In:</strong></td>
|
|
57
57
|
<td>
|
|
58
|
-
<a href="../../../files/lib/adapters/
|
|
59
|
-
lib/adapters/
|
|
58
|
+
<a href="../../../files/lib/cachetastic/adapters/local_memory_rb.html">
|
|
59
|
+
lib/cachetastic/adapters/local_memory.rb
|
|
60
60
|
</a>
|
|
61
61
|
<br />
|
|
62
62
|
</td>
|
|
@@ -96,13 +96,13 @@ It‘s also a very good example of how to write a adapter.
|
|
|
96
96
|
<h3 class="section-bar">Methods</h3>
|
|
97
97
|
|
|
98
98
|
<div class="name-list">
|
|
99
|
-
<a href="#
|
|
100
|
-
<a href="#
|
|
101
|
-
<a href="#
|
|
102
|
-
<a href="#
|
|
103
|
-
<a href="#
|
|
104
|
-
<a href="#
|
|
105
|
-
<a href="#
|
|
99
|
+
<a href="#M000024">delete</a>
|
|
100
|
+
<a href="#M000021">expire_all</a>
|
|
101
|
+
<a href="#M000022">get</a>
|
|
102
|
+
<a href="#M000023">set</a>
|
|
103
|
+
<a href="#M000020">setup</a>
|
|
104
|
+
<a href="#M000025">stats</a>
|
|
105
|
+
<a href="#M000019">valid?</a>
|
|
106
106
|
</div>
|
|
107
107
|
</div>
|
|
108
108
|
|
|
@@ -137,21 +137,21 @@ It‘s also a very good example of how to write a adapter.
|
|
|
137
137
|
<div id="methods">
|
|
138
138
|
<h3 class="section-bar">Public Instance methods</h3>
|
|
139
139
|
|
|
140
|
-
<div id="method-
|
|
141
|
-
<a name="
|
|
140
|
+
<div id="method-M000024" class="method-detail">
|
|
141
|
+
<a name="M000024"></a>
|
|
142
142
|
|
|
143
143
|
<div class="method-heading">
|
|
144
|
-
<a href="#
|
|
144
|
+
<a href="#M000024" class="method-signature">
|
|
145
145
|
<span class="method-name">delete</span><span class="method-args">(key, delay = 0)</span>
|
|
146
146
|
</a>
|
|
147
147
|
</div>
|
|
148
148
|
|
|
149
149
|
<div class="method-description">
|
|
150
150
|
<p><a class="source-toggle" href="#"
|
|
151
|
-
onclick="toggleCode('
|
|
152
|
-
<div class="method-source-code" id="
|
|
151
|
+
onclick="toggleCode('M000024-source');return false;">[Source]</a></p>
|
|
152
|
+
<div class="method-source-code" id="M000024-source">
|
|
153
153
|
<pre>
|
|
154
|
-
<span class="ruby-comment cmt"># File lib/adapters/
|
|
154
|
+
<span class="ruby-comment cmt"># File lib/cachetastic/adapters/local_memory.rb, line 37</span>
|
|
155
155
|
37: <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>)
|
|
156
156
|
38: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">delay</span> <span class="ruby-operator"><=</span> <span class="ruby-value">0</span>
|
|
157
157
|
39: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">local_store</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_s</span>)
|
|
@@ -167,21 +167,21 @@ It‘s also a very good example of how to write a adapter.
|
|
|
167
167
|
</div>
|
|
168
168
|
</div>
|
|
169
169
|
|
|
170
|
-
<div id="method-
|
|
171
|
-
<a name="
|
|
170
|
+
<div id="method-M000021" class="method-detail">
|
|
171
|
+
<a name="M000021"></a>
|
|
172
172
|
|
|
173
173
|
<div class="method-heading">
|
|
174
|
-
<a href="#
|
|
174
|
+
<a href="#M000021" class="method-signature">
|
|
175
175
|
<span class="method-name">expire_all</span><span class="method-args">()</span>
|
|
176
176
|
</a>
|
|
177
177
|
</div>
|
|
178
178
|
|
|
179
179
|
<div class="method-description">
|
|
180
180
|
<p><a class="source-toggle" href="#"
|
|
181
|
-
onclick="toggleCode('
|
|
182
|
-
<div class="method-source-code" id="
|
|
181
|
+
onclick="toggleCode('M000021-source');return false;">[Source]</a></p>
|
|
182
|
+
<div class="method-source-code" id="M000021-source">
|
|
183
183
|
<pre>
|
|
184
|
-
<span class="ruby-comment cmt"># File lib/adapters/
|
|
184
|
+
<span class="ruby-comment cmt"># File lib/cachetastic/adapters/local_memory.rb, line 16</span>
|
|
185
185
|
16: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">expire_all</span>
|
|
186
186
|
17: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">local_store</span> = {}
|
|
187
187
|
18: <span class="ruby-keyword kw">end</span>
|
|
@@ -190,11 +190,11 @@ It‘s also a very good example of how to write a adapter.
|
|
|
190
190
|
</div>
|
|
191
191
|
</div>
|
|
192
192
|
|
|
193
|
-
<div id="method-
|
|
194
|
-
<a name="
|
|
193
|
+
<div id="method-M000022" class="method-detail">
|
|
194
|
+
<a name="M000022"></a>
|
|
195
195
|
|
|
196
196
|
<div class="method-heading">
|
|
197
|
-
<a href="#
|
|
197
|
+
<a href="#M000022" class="method-signature">
|
|
198
198
|
<span class="method-name">get</span><span class="method-args">(key)</span>
|
|
199
199
|
</a>
|
|
200
200
|
</div>
|
|
@@ -204,10 +204,10 @@ It‘s also a very good example of how to write a adapter.
|
|
|
204
204
|
See <a href="Base.html">Cachetastic::Adapters::Base</a>
|
|
205
205
|
</p>
|
|
206
206
|
<p><a class="source-toggle" href="#"
|
|
207
|
-
onclick="toggleCode('
|
|
208
|
-
<div class="method-source-code" id="
|
|
207
|
+
onclick="toggleCode('M000022-source');return false;">[Source]</a></p>
|
|
208
|
+
<div class="method-source-code" id="M000022-source">
|
|
209
209
|
<pre>
|
|
210
|
-
<span class="ruby-comment cmt"># File lib/adapters/
|
|
210
|
+
<span class="ruby-comment cmt"># File lib/cachetastic/adapters/local_memory.rb, line 21</span>
|
|
211
211
|
21: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get</span>(<span class="ruby-identifier">key</span>)
|
|
212
212
|
22: <span class="ruby-identifier">so</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">local_store</span>[<span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_s</span>]
|
|
213
213
|
23: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">so</span>
|
|
@@ -224,21 +224,21 @@ See <a href="Base.html">Cachetastic::Adapters::Base</a>
|
|
|
224
224
|
</div>
|
|
225
225
|
</div>
|
|
226
226
|
|
|
227
|
-
<div id="method-
|
|
228
|
-
<a name="
|
|
227
|
+
<div id="method-M000023" class="method-detail">
|
|
228
|
+
<a name="M000023"></a>
|
|
229
229
|
|
|
230
230
|
<div class="method-heading">
|
|
231
|
-
<a href="#
|
|
231
|
+
<a href="#M000023" class="method-signature">
|
|
232
232
|
<span class="method-name">set</span><span class="method-args">(key, value, expiry = 0)</span>
|
|
233
233
|
</a>
|
|
234
234
|
</div>
|
|
235
235
|
|
|
236
236
|
<div class="method-description">
|
|
237
237
|
<p><a class="source-toggle" href="#"
|
|
238
|
-
onclick="toggleCode('
|
|
239
|
-
<div class="method-source-code" id="
|
|
238
|
+
onclick="toggleCode('M000023-source');return false;">[Source]</a></p>
|
|
239
|
+
<div class="method-source-code" id="M000023-source">
|
|
240
240
|
<pre>
|
|
241
|
-
<span class="ruby-comment cmt"># File lib/adapters/
|
|
241
|
+
<span class="ruby-comment cmt"># File lib/cachetastic/adapters/local_memory.rb, line 33</span>
|
|
242
242
|
33: <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-value">0</span>)
|
|
243
243
|
34: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">local_store</span>[<span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_s</span>] = <span class="ruby-constant">Cachetastic</span><span class="ruby-operator">::</span><span class="ruby-constant">Adapters</span><span class="ruby-operator">::</span><span class="ruby-constant">StoreObject</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-identifier">value</span>, <span class="ruby-identifier">expiry</span>)
|
|
244
244
|
35: <span class="ruby-keyword kw">end</span>
|
|
@@ -247,21 +247,21 @@ See <a href="Base.html">Cachetastic::Adapters::Base</a>
|
|
|
247
247
|
</div>
|
|
248
248
|
</div>
|
|
249
249
|
|
|
250
|
-
<div id="method-
|
|
251
|
-
<a name="
|
|
250
|
+
<div id="method-M000020" class="method-detail">
|
|
251
|
+
<a name="M000020"></a>
|
|
252
252
|
|
|
253
253
|
<div class="method-heading">
|
|
254
|
-
<a href="#
|
|
254
|
+
<a href="#M000020" class="method-signature">
|
|
255
255
|
<span class="method-name">setup</span><span class="method-args">()</span>
|
|
256
256
|
</a>
|
|
257
257
|
</div>
|
|
258
258
|
|
|
259
259
|
<div class="method-description">
|
|
260
260
|
<p><a class="source-toggle" href="#"
|
|
261
|
-
onclick="toggleCode('
|
|
262
|
-
<div class="method-source-code" id="
|
|
261
|
+
onclick="toggleCode('M000020-source');return false;">[Source]</a></p>
|
|
262
|
+
<div class="method-source-code" id="M000020-source">
|
|
263
263
|
<pre>
|
|
264
|
-
<span class="ruby-comment cmt"># File lib/adapters/
|
|
264
|
+
<span class="ruby-comment cmt"># File lib/cachetastic/adapters/local_memory.rb, line 12</span>
|
|
265
265
|
12: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setup</span>
|
|
266
266
|
13: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">local_store</span> = {}
|
|
267
267
|
14: <span class="ruby-keyword kw">end</span>
|
|
@@ -270,21 +270,21 @@ See <a href="Base.html">Cachetastic::Adapters::Base</a>
|
|
|
270
270
|
</div>
|
|
271
271
|
</div>
|
|
272
272
|
|
|
273
|
-
<div id="method-
|
|
274
|
-
<a name="
|
|
273
|
+
<div id="method-M000025" class="method-detail">
|
|
274
|
+
<a name="M000025"></a>
|
|
275
275
|
|
|
276
276
|
<div class="method-heading">
|
|
277
|
-
<a href="#
|
|
277
|
+
<a href="#M000025" class="method-signature">
|
|
278
278
|
<span class="method-name">stats</span><span class="method-args">()</span>
|
|
279
279
|
</a>
|
|
280
280
|
</div>
|
|
281
281
|
|
|
282
282
|
<div class="method-description">
|
|
283
283
|
<p><a class="source-toggle" href="#"
|
|
284
|
-
onclick="toggleCode('
|
|
285
|
-
<div class="method-source-code" id="
|
|
284
|
+
onclick="toggleCode('M000025-source');return false;">[Source]</a></p>
|
|
285
|
+
<div class="method-source-code" id="M000025-source">
|
|
286
286
|
<pre>
|
|
287
|
-
<span class="ruby-comment cmt"># File lib/adapters/
|
|
287
|
+
<span class="ruby-comment cmt"># File lib/cachetastic/adapters/local_memory.rb, line 48</span>
|
|
288
288
|
48: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stats</span>
|
|
289
289
|
49: <span class="ruby-keyword kw">super</span>
|
|
290
290
|
50: <span class="ruby-identifier">num_keys</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">local_store</span>.<span class="ruby-identifier">size</span>
|
|
@@ -308,21 +308,21 @@ See <a href="Base.html">Cachetastic::Adapters::Base</a>
|
|
|
308
308
|
</div>
|
|
309
309
|
</div>
|
|
310
310
|
|
|
311
|
-
<div id="method-
|
|
312
|
-
<a name="
|
|
311
|
+
<div id="method-M000019" class="method-detail">
|
|
312
|
+
<a name="M000019"></a>
|
|
313
313
|
|
|
314
314
|
<div class="method-heading">
|
|
315
|
-
<a href="#
|
|
315
|
+
<a href="#M000019" class="method-signature">
|
|
316
316
|
<span class="method-name">valid?</span><span class="method-args">()</span>
|
|
317
317
|
</a>
|
|
318
318
|
</div>
|
|
319
319
|
|
|
320
320
|
<div class="method-description">
|
|
321
321
|
<p><a class="source-toggle" href="#"
|
|
322
|
-
onclick="toggleCode('
|
|
323
|
-
<div class="method-source-code" id="
|
|
322
|
+
onclick="toggleCode('M000019-source');return false;">[Source]</a></p>
|
|
323
|
+
<div class="method-source-code" id="M000019-source">
|
|
324
324
|
<pre>
|
|
325
|
-
<span class="ruby-comment cmt"># File lib/adapters/
|
|
325
|
+
<span class="ruby-comment cmt"># File lib/cachetastic/adapters/local_memory.rb, line 8</span>
|
|
326
326
|
8: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">valid?</span>
|
|
327
327
|
9: <span class="ruby-keyword kw">true</span>
|
|
328
328
|
10: <span class="ruby-keyword kw">end</span>
|