cachetastic 1.1.8 → 1.2.1

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.
Files changed (70) hide show
  1. data/README +3 -3
  2. data/doc/classes/Cachetastic/{Stores → Adapters}/Base.html +8 -8
  3. data/doc/classes/Cachetastic/{Stores → Adapters}/Base.src/M000023.html +2 -2
  4. data/doc/classes/Cachetastic/{Stores → Adapters}/Base.src/M000024.html +2 -2
  5. data/doc/classes/Cachetastic/{Stores → Adapters}/Base.src/M000025.html +4 -4
  6. data/doc/classes/Cachetastic/{Stores → Adapters}/File.html +7 -7
  7. data/doc/classes/Cachetastic/{Stores → Adapters}/File.src/M000026.html +2 -2
  8. data/doc/classes/Cachetastic/{Stores → Adapters}/File.src/M000027.html +2 -2
  9. data/doc/classes/Cachetastic/{Stores → Adapters}/File.src/M000028.html +2 -2
  10. data/doc/classes/Cachetastic/{Stores → Adapters}/File.src/M000029.html +2 -2
  11. data/doc/classes/Cachetastic/{Stores → Adapters}/File.src/M000030.html +3 -3
  12. data/doc/classes/Cachetastic/{Stores → Adapters}/File.src/M000031.html +2 -2
  13. data/doc/classes/Cachetastic/{Stores → Adapters}/LocalMemory.html +8 -8
  14. data/doc/classes/Cachetastic/{Stores → Adapters}/LocalMemory.src/M000017.html +2 -2
  15. data/doc/classes/Cachetastic/{Stores → Adapters}/LocalMemory.src/M000018.html +2 -2
  16. data/doc/classes/Cachetastic/{Stores → Adapters}/LocalMemory.src/M000019.html +2 -2
  17. data/doc/classes/Cachetastic/{Stores → Adapters}/LocalMemory.src/M000020.html +2 -2
  18. data/doc/classes/Cachetastic/{Stores → Adapters}/LocalMemory.src/M000021.html +3 -3
  19. data/doc/classes/Cachetastic/{Stores → Adapters}/LocalMemory.src/M000022.html +2 -2
  20. data/doc/classes/Cachetastic/{Stores → Adapters}/Memcache.html +8 -8
  21. data/doc/classes/Cachetastic/{Stores → Adapters}/Memcache.src/M000006.html +2 -2
  22. data/doc/classes/Cachetastic/{Stores → Adapters}/Memcache.src/M000007.html +2 -2
  23. data/doc/classes/Cachetastic/{Stores → Adapters}/Memcache.src/M000008.html +2 -2
  24. data/doc/classes/Cachetastic/{Stores → Adapters}/Memcache.src/M000009.html +2 -2
  25. data/doc/classes/Cachetastic/{Stores → Adapters}/Memcache.src/M000010.html +2 -2
  26. data/doc/classes/Cachetastic/{Stores → Adapters}/Memcache.src/M000011.html +2 -2
  27. data/doc/classes/Cachetastic/{Stores → Adapters}/Memcache.src/M000012.html +2 -2
  28. data/doc/classes/Cachetastic/{Stores → Adapters}/Memcache.src/M000013.html +2 -2
  29. data/doc/classes/Cachetastic/{Stores → Adapters}/Memcache.src/M000014.html +2 -2
  30. data/doc/classes/Cachetastic/{Stores → Adapters}/Memcache.src/M000015.html +2 -2
  31. data/doc/classes/Cachetastic/{Stores → Adapters}/Memcache.src/M000016.html +2 -2
  32. data/doc/classes/Cachetastic/Caches/Base.html +23 -22
  33. data/doc/classes/Cachetastic/Caches/Base.src/M000033.html +21 -6
  34. data/doc/classes/Cachetastic/Caches/Base.src/M000034.html +3 -3
  35. data/doc/classes/Cachetastic/Caches/Base.src/M000035.html +2 -2
  36. data/doc/classes/Cachetastic/Caches/Base.src/M000036.html +2 -2
  37. data/doc/classes/Cachetastic/Caches/Base.src/M000037.html +1 -1
  38. data/doc/classes/Cachetastic/Caches/Base.src/M000038.html +2 -2
  39. data/doc/classes/Cachetastic/Caches/Base.src/M000039.html +1 -1
  40. data/doc/classes/Cachetastic/Caches/Base.src/M000040.html +3 -3
  41. data/doc/classes/Cachetastic/Caches/Base.src/M000041.html +2 -2
  42. data/doc/classes/Cachetastic/Caches/Base.src/M000042.html +2 -2
  43. data/doc/classes/Cachetastic/Connection.html +4 -4
  44. data/doc/classes/Cachetastic/Connection.src/M000045.html +2 -2
  45. data/doc/classes/Cachetastic/Logger.html +1 -1
  46. data/doc/created.rid +1 -1
  47. data/doc/files/init_rb.html +3 -3
  48. data/doc/files/lib/{stores/cachetastic_stores_base_rb.html → adapters/cachetastic_adapters_base_rb.html} +7 -7
  49. data/doc/files/lib/{stores/cachetastic_stores_file_rb.html → adapters/cachetastic_adapters_file_rb.html} +6 -6
  50. data/doc/files/lib/{stores/cachetastic_stores_local_memory_rb.html → adapters/cachetastic_adapters_local_memory_rb.html} +6 -6
  51. data/doc/files/lib/{stores/cachetastic_stores_memcache_rb.html → adapters/cachetastic_adapters_memcache_rb.html} +7 -7
  52. data/doc/files/lib/{stores/cachetastic_stores_store_object_rb.html → adapters/cachetastic_adapters_store_object_rb.html} +4 -4
  53. data/doc/files/lib/caches/cachetastic_caches_base_rb.html +1 -1
  54. data/doc/files/lib/cachetastic_connection_rb.html +2 -2
  55. data/doc/files/lib/cachetastic_logger_rb.html +2 -2
  56. data/doc/files/lib/cachetastic_rb.html +9 -9
  57. data/doc/fr_class_index.html +4 -4
  58. data/doc/fr_file_index.html +5 -5
  59. data/doc/fr_method_index.html +29 -29
  60. data/lib/{stores/cachetastic_stores_base.rb → adapters/cachetastic_adapters_base.rb} +8 -8
  61. data/lib/{stores/cachetastic_stores_file.rb → adapters/cachetastic_adapters_file.rb} +4 -4
  62. data/lib/{stores/cachetastic_stores_local_memory.rb → adapters/cachetastic_adapters_local_memory.rb} +5 -5
  63. data/lib/{stores/cachetastic_stores_memcache.rb → adapters/cachetastic_adapters_memcache.rb} +3 -3
  64. data/lib/{stores/cachetastic_stores_store_object.rb → adapters/cachetastic_adapters_store_object.rb} +1 -1
  65. data/lib/caches/cachetastic_caches_base.rb +35 -20
  66. data/lib/cachetastic.rb +6 -6
  67. data/lib/cachetastic_connection.rb +5 -5
  68. data/lib/cachetastic_logger.rb +1 -1
  69. data/lib/tasks/rubyforge_config.yml +1 -1
  70. metadata +86 -79
@@ -5,12 +5,12 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>setup (Cachetastic::Stores::Memcache)</title>
8
+ <title>setup (Cachetastic::Adapters::Memcache)</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/stores/cachetastic_stores_memcache.rb, line 22</span>
13
+ <pre><span class="ruby-comment cmt"># File lib/adapters/cachetastic_adapters_memcache.rb, line 22</span>
14
14
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setup</span>
15
15
  <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">conn</span> = <span class="ruby-constant">MemCache</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">servers</span>, <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">store_options</span>.<span class="ruby-identifier">merge</span>({<span class="ruby-identifier">:namespace</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">namespace</span>}))
16
16
  <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">version</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">get_version</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">name</span>)
@@ -5,12 +5,12 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>set (Cachetastic::Stores::Memcache)</title>
8
+ <title>set (Cachetastic::Adapters::Memcache)</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/stores/cachetastic_stores_memcache.rb, line 27</span>
13
+ <pre><span class="ruby-comment cmt"># File lib/adapters/cachetastic_adapters_memcache.rb, line 27</span>
14
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-value">0</span>)
15
15
  <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">conn</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>)
16
16
  <span class="ruby-keyword kw">end</span></pre>
@@ -5,12 +5,12 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>delete (Cachetastic::Stores::Memcache)</title>
8
+ <title>delete (Cachetastic::Adapters::Memcache)</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/stores/cachetastic_stores_memcache.rb, line 31</span>
13
+ <pre><span class="ruby-comment cmt"># File lib/adapters/cachetastic_adapters_memcache.rb, line 31</span>
14
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
15
  <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">conn</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">key</span>, <span class="ruby-identifier">delay</span>)
16
16
  <span class="ruby-keyword kw">end</span></pre>
@@ -5,12 +5,12 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>get (Cachetastic::Stores::Memcache)</title>
8
+ <title>get (Cachetastic::Adapters::Memcache)</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/stores/cachetastic_stores_memcache.rb, line 35</span>
13
+ <pre><span class="ruby-comment cmt"># File lib/adapters/cachetastic_adapters_memcache.rb, line 35</span>
14
14
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get</span>(<span class="ruby-identifier">key</span>)
15
15
  <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">conn</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">key</span>)
16
16
  <span class="ruby-keyword kw">end</span></pre>
@@ -5,12 +5,12 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>expire_all (Cachetastic::Stores::Memcache)</title>
8
+ <title>expire_all (Cachetastic::Adapters::Memcache)</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/stores/cachetastic_stores_memcache.rb, line 39</span>
13
+ <pre><span class="ruby-comment cmt"># File lib/adapters/cachetastic_adapters_memcache.rb, line 39</span>
14
14
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">expire_all</span>
15
15
  <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">increment_version</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">name</span>)
16
16
  <span class="ruby-keyword kw">end</span></pre>
@@ -5,12 +5,12 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>inspect (Cachetastic::Stores::Memcache)</title>
8
+ <title>inspect (Cachetastic::Adapters::Memcache)</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/stores/cachetastic_stores_memcache.rb, line 43</span>
13
+ <pre><span class="ruby-comment cmt"># File lib/adapters/cachetastic_adapters_memcache.rb, line 43</span>
14
14
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">inspect</span>
15
15
  <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">conn</span>.<span class="ruby-identifier">inspect</span> <span class="ruby-operator">+</span> <span class="ruby-node">&quot; &lt;version: #{self.version}&gt; #{self.conn.stats.inspect}&quot;</span>
16
16
  <span class="ruby-keyword kw">end</span></pre>
@@ -5,12 +5,12 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>valid? (Cachetastic::Stores::Memcache)</title>
8
+ <title>valid? (Cachetastic::Adapters::Memcache)</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/stores/cachetastic_stores_memcache.rb, line 47</span>
13
+ <pre><span class="ruby-comment cmt"># File lib/adapters/cachetastic_adapters_memcache.rb, line 47</span>
14
14
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">valid?</span>
15
15
  <span class="ruby-keyword kw">begin</span>
16
16
  <span class="ruby-keyword kw">return</span> (<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">conn</span>.<span class="ruby-identifier">active?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">version</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">get_version</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">name</span>))
@@ -5,12 +5,12 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>namespace (Cachetastic::Stores::Memcache)</title>
8
+ <title>namespace (Cachetastic::Adapters::Memcache)</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/stores/cachetastic_stores_memcache.rb, line 61</span>
13
+ <pre><span class="ruby-comment cmt"># File lib/adapters/cachetastic_adapters_memcache.rb, line 61</span>
14
14
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">namespace</span>
15
15
  <span class="ruby-identifier">v</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">get_version</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">name</span>)
16
16
  <span class="ruby-keyword kw">return</span> <span class="ruby-node">&quot;#{name}.#{v}&quot;</span>
@@ -5,12 +5,12 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>ns_versions (Cachetastic::Stores::Memcache)</title>
8
+ <title>ns_versions (Cachetastic::Adapters::Memcache)</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/stores/cachetastic_stores_memcache.rb, line 66</span>
13
+ <pre><span class="ruby-comment cmt"># File lib/adapters/cachetastic_adapters_memcache.rb, line 66</span>
14
14
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ns_versions</span>
15
15
  <span class="ruby-identifier">ivar_cache</span> <span class="ruby-keyword kw">do</span>
16
16
  <span class="ruby-identifier">ns_conn</span> = <span class="ruby-constant">MemCache</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">servers</span>, <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">store_options</span>.<span class="ruby-identifier">merge</span>({<span class="ruby-identifier">:namespace</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">:namespace_versions</span>}))
@@ -5,12 +5,12 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>increment_version (Cachetastic::Stores::Memcache)</title>
8
+ <title>increment_version (Cachetastic::Adapters::Memcache)</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/stores/cachetastic_stores_memcache.rb, line 72</span>
13
+ <pre><span class="ruby-comment cmt"># File lib/adapters/cachetastic_adapters_memcache.rb, line 72</span>
14
14
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">increment_version</span>(<span class="ruby-identifier">name</span>)
15
15
  <span class="ruby-identifier">name</span> = <span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_s</span>
16
16
  <span class="ruby-identifier">v</span> = <span class="ruby-identifier">get_version</span>(<span class="ruby-identifier">name</span>)
@@ -5,12 +5,12 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>get_version (Cachetastic::Stores::Memcache)</title>
8
+ <title>get_version (Cachetastic::Adapters::Memcache)</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/stores/cachetastic_stores_memcache.rb, line 78</span>
13
+ <pre><span class="ruby-comment cmt"># File lib/adapters/cachetastic_adapters_memcache.rb, line 78</span>
14
14
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_version</span>(<span class="ruby-identifier">name</span>)
15
15
  <span class="ruby-identifier">name</span> = <span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_s</span>
16
16
  <span class="ruby-identifier">v</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">ns_versions</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">name</span>)
@@ -118,6 +118,7 @@ different for your cache.
118
118
  <h3 class="section-bar">Methods</h3>
119
119
 
120
120
  <div class="name-list">
121
+ <a href="#M000040">adapter</a>&nbsp;&nbsp;
121
122
  <a href="#M000032">all_registered_caches</a>&nbsp;&nbsp;
122
123
  <a href="#M000039">cache_name</a>&nbsp;&nbsp;
123
124
  <a href="#M000042">calculate_expiry_time</a>&nbsp;&nbsp;
@@ -128,7 +129,6 @@ different for your cache.
128
129
  <a href="#M000037">populate_all</a>&nbsp;&nbsp;
129
130
  <a href="#M000034">set</a>&nbsp;&nbsp;
130
131
  <a href="#M000038">stats</a>&nbsp;&nbsp;
131
- <a href="#M000040">store</a>&nbsp;&nbsp;
132
132
  </div>
133
133
  </div>
134
134
 
@@ -169,6 +169,25 @@ different for your cache.
169
169
  <div id="methods">
170
170
  <h3 class="section-bar">Public Class methods</h3>
171
171
 
172
+ <div id="method-M000040" class="method-detail">
173
+ <a name="M000040"></a>
174
+
175
+ <div class="method-heading">
176
+ <a href="Base.src/M000040.html" target="Code" class="method-signature"
177
+ onclick="popupCode('Base.src/M000040.html');return false;">
178
+ <span class="method-name">adapter</span><span class="method-args">()</span>
179
+ </a>
180
+ </div>
181
+
182
+ <div class="method-description">
183
+ <p>
184
+ Returns the underlying <a
185
+ href="../Adapters/Base.html">Cachetastic::Adapters::Base</a> for this
186
+ cache.
187
+ </p>
188
+ </div>
189
+ </div>
190
+
172
191
  <div id="method-M000032" class="method-detail">
173
192
  <a name="M000032"></a>
174
193
 
@@ -280,7 +299,7 @@ results of the block are not automatically cached.
280
299
  <div class="method-description">
281
300
  <p>
282
301
  Returns the <a href="../Logger.html">Cachetastic::Logger</a> for the
283
- underlying <a href="../Stores/Base.html">Cachetastic::Stores::Base</a>.
302
+ underlying <a href="../Adapters/Base.html">Cachetastic::Adapters::Base</a>.
284
303
  </p>
285
304
  </div>
286
305
  </div>
@@ -310,7 +329,7 @@ should be in there.
310
329
  <div class="method-heading">
311
330
  <a href="Base.src/M000034.html" target="Code" class="method-signature"
312
331
  onclick="popupCode('Base.src/M000034.html');return false;">
313
- <span class="method-name">set</span><span class="method-args">(key, value, expiry = (store.all_options[&quot;default_expiry&quot;] || 0))</span>
332
+ <span class="method-name">set</span><span class="method-args">(key, value, expiry = (adapter.all_options[&quot;default_expiry&quot;] || 0))</span>
314
333
  </a>
315
334
  </div>
316
335
 
@@ -341,25 +360,7 @@ href="Base.html#M000042">calculate_expiry_time</a>
341
360
  <div class="method-description">
342
361
  <p>
343
362
  A convenience method that returns statistics for the underlying <a
344
- href="../Stores/Base.html">Cachetastic::Stores::Base</a> for the cache.
345
- </p>
346
- </div>
347
- </div>
348
-
349
- <div id="method-M000040" class="method-detail">
350
- <a name="M000040"></a>
351
-
352
- <div class="method-heading">
353
- <a href="Base.src/M000040.html" target="Code" class="method-signature"
354
- onclick="popupCode('Base.src/M000040.html');return false;">
355
- <span class="method-name">store</span><span class="method-args">()</span>
356
- </a>
357
- </div>
358
-
359
- <div class="method-description">
360
- <p>
361
- Returns the underlying <a
362
- href="../Stores/Base.html">Cachetastic::Stores::Base</a> for this cache.
363
+ href="../Adapters/Base.html">Cachetastic::Adapters::Base</a> for the cache.
363
364
  </p>
364
365
  </div>
365
366
  </div>
@@ -14,13 +14,28 @@
14
14
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get</span>(<span class="ruby-identifier">key</span>)
15
15
  <span class="ruby-identifier">res</span> = <span class="ruby-keyword kw">nil</span>
16
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-identifier">key</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>)
17
+ <span class="ruby-identifier">retryable</span>(<span class="ruby-identifier">:on</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">ArgumentError</span>) <span class="ruby-keyword kw">do</span>
18
+ <span class="ruby-keyword kw">begin</span>
19
+ <span class="ruby-identifier">res</span> = <span class="ruby-identifier">adapter</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_s</span>)
20
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">res</span>.<span class="ruby-identifier">nil?</span>
21
+ <span class="ruby-identifier">res</span> = <span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">key</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
22
+ <span class="ruby-keyword kw">else</span>
23
+ <span class="ruby-identifier">res</span> = <span class="ruby-identifier">unmarshall</span>(<span class="ruby-identifier">res</span>)
24
+ <span class="ruby-keyword kw">end</span>
25
+ <span class="ruby-identifier">res</span>
26
+ <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">ArgumentError</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
27
+ <span class="ruby-identifier">m</span> = <span class="ruby-identifier">e</span>.<span class="ruby-identifier">message</span>.<span class="ruby-identifier">match</span>(<span class="ruby-regexp re">/class\/module .*/</span>)
28
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">m</span>
29
+ <span class="ruby-identifier">m</span> = <span class="ruby-identifier">m</span>.<span class="ruby-identifier">to_s</span>
30
+ <span class="ruby-identifier">m</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-value str">&quot;class/module&quot;</span>, <span class="ruby-value str">''</span>)
31
+ <span class="ruby-identifier">m</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-value str">&quot;(ArgumentError)&quot;</span>, <span class="ruby-value str">''</span>)
32
+ <span class="ruby-identifier">require</span> <span class="ruby-identifier">m</span>.<span class="ruby-identifier">strip</span>.<span class="ruby-identifier">underscore</span>
33
+ <span class="ruby-identifier">raise</span> <span class="ruby-identifier">e</span>
34
+ <span class="ruby-keyword kw">end</span>
35
+ <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
36
+ <span class="ruby-identifier">raise</span> <span class="ruby-identifier">e</span>
37
+ <span class="ruby-keyword kw">end</span>
22
38
  <span class="ruby-keyword kw">end</span>
23
- <span class="ruby-identifier">res</span>
24
39
  <span class="ruby-keyword kw">end</span>
25
40
  <span class="ruby-identifier">res</span>
26
41
  <span class="ruby-keyword kw">end</span></pre>
@@ -10,11 +10,11 @@
10
10
  <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/caches/cachetastic_caches_base.rb, line 79</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">&quot;default_expiry&quot;</span>] <span class="ruby-operator">||</span> <span class="ruby-value">0</span>))
13
+ <pre><span class="ruby-comment cmt"># File lib/caches/cachetastic_caches_base.rb, line 94</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">adapter</span>.<span class="ruby-identifier">all_options</span>[<span class="ruby-value str">&quot;default_expiry&quot;</span>] <span class="ruby-operator">||</span> <span class="ruby-value">0</span>))
15
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
16
  <span class="ruby-identifier">expiry</span> = <span class="ruby-identifier">calculate_expiry_time</span>(<span class="ruby-identifier">expiry</span>)
17
- <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>)
17
+ <span class="ruby-identifier">adapter</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>)
18
18
  <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>)
19
19
  <span class="ruby-identifier">value</span>
20
20
  <span class="ruby-keyword kw">end</span>
@@ -10,10 +10,10 @@
10
10
  <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/caches/cachetastic_caches_base.rb, line 93</span>
13
+ <pre><span class="ruby-comment cmt"># File lib/caches/cachetastic_caches_base.rb, line 108</span>
14
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
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>)
16
+ <span class="ruby-identifier">adapter</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
17
  <span class="ruby-keyword kw">end</span>
18
18
  <span class="ruby-keyword kw">end</span></pre>
19
19
  </body>
@@ -10,9 +10,9 @@
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 100</span>
13
+ <pre><span class="ruby-comment cmt"># File lib/caches/cachetastic_caches_base.rb, line 115</span>
14
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>
15
+ <span class="ruby-identifier">adapter</span>.<span class="ruby-identifier">expire_all</span>
16
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>)
17
17
  <span class="ruby-keyword kw">end</span></pre>
18
18
  </body>
@@ -10,7 +10,7 @@
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 108</span>
13
+ <pre><span class="ruby-comment cmt"># File lib/caches/cachetastic_caches_base.rb, line 123</span>
14
14
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">populate_all</span>
15
15
  <span class="ruby-identifier">raise</span> <span class="ruby-constant">MethodNotImplemented</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">&quot;populate_all&quot;</span>)
16
16
  <span class="ruby-keyword kw">end</span></pre>
@@ -10,9 +10,9 @@
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 113</span>
13
+ <pre><span class="ruby-comment cmt"># File lib/caches/cachetastic_caches_base.rb, line 128</span>
14
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>
15
+ <span class="ruby-identifier">adapter</span>.<span class="ruby-identifier">stats</span>
16
16
  <span class="ruby-keyword kw">end</span></pre>
17
17
  </body>
18
18
  </html>
@@ -10,7 +10,7 @@
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 121</span>
13
+ <pre><span class="ruby-comment cmt"># File lib/caches/cachetastic_caches_base.rb, line 136</span>
14
14
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cache_name</span>
15
15
  <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">name</span>.<span class="ruby-identifier">methodize</span>
16
16
  <span class="ruby-keyword kw">end</span></pre>
@@ -5,13 +5,13 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>store (Cachetastic::Caches::Base)</title>
8
+ <title>adapter (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 126</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store</span>
13
+ <pre><span class="ruby-comment cmt"># File lib/caches/cachetastic_caches_base.rb, line 141</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">adapter</span>
15
15
  <span class="ruby-identifier">cache_conn_instance</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">cache_name</span>)
16
16
  <span class="ruby-keyword kw">end</span></pre>
17
17
  </body>
@@ -10,9 +10,9 @@
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 131</span>
13
+ <pre><span class="ruby-comment cmt"># File lib/caches/cachetastic_caches_base.rb, line 146</span>
14
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>
15
+ <span class="ruby-identifier">adapter</span>.<span class="ruby-identifier">logger</span>
16
16
  <span class="ruby-keyword kw">end</span></pre>
17
17
  </body>
18
18
  </html>
@@ -10,9 +10,9 @@
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 138</span>
13
+ <pre><span class="ruby-comment cmt"># File lib/caches/cachetastic_caches_base.rb, line 153</span>
14
14
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">calculate_expiry_time</span>(<span class="ruby-identifier">expiry</span>) <span class="ruby-comment cmt"># :doc:</span>
15
- <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">&quot;expiry_swing&quot;</span>]
15
+ <span class="ruby-identifier">exp_swing</span> = <span class="ruby-identifier">adapter</span>.<span class="ruby-identifier">all_options</span>[<span class="ruby-value str">&quot;expiry_swing&quot;</span>]
16
16
  <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">exp_swing</span>
17
17
  <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>)
18
18
  <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">rand</span>(<span class="ruby-value">2</span>)
@@ -80,7 +80,7 @@
80
80
 
81
81
  <div id="description">
82
82
  <p>
83
- This class caches store objects for each cache in the system.
83
+ This class caches adapter objects for each cache in the system.
84
84
  </p>
85
85
 
86
86
  </div>
@@ -164,9 +164,9 @@ This class caches store objects for each cache in the system.
164
164
  <div class="method-description">
165
165
  <p>
166
166
  Takes the name of the cache, that&#8216;s been methodized, and returns back
167
- the store object associated with the cache. If the store object
168
- doesn&#8216;t exist or if the store is no longer valid (store.valid?) a <a
169
- href="Connection.html#M000044">new</a> one is created and returned.
167
+ the adapter object associated with the cache. If the adapter object
168
+ doesn&#8216;t exist or if the adapter is no longer valid (adapter.valid?) a
169
+ <a href="Connection.html#M000044">new</a> one is created and returned.
170
170
  </p>
171
171
  </div>
172
172
  </div>
@@ -15,8 +15,8 @@
15
15
  <span class="ruby-identifier">name</span> = <span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_sym</span>
16
16
  <span class="ruby-identifier">conn</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">connections</span>[<span class="ruby-identifier">name</span>]
17
17
  <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">conn</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">conn</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">conn</span>.<span class="ruby-identifier">valid?</span>
18
- <span class="ruby-identifier">store</span> = <span class="ruby-constant">Cachetastic</span><span class="ruby-operator">::</span><span class="ruby-constant">Stores</span><span class="ruby-operator">::</span><span class="ruby-constant">Base</span>.<span class="ruby-identifier">get_options</span>(<span class="ruby-identifier">name</span>)[<span class="ruby-value str">&quot;store&quot;</span>].<span class="ruby-identifier">camelcase</span>
19
- <span class="ruby-identifier">conn</span> = <span class="ruby-node">&quot;Cachetastic::Stores::#{store}&quot;</span>.<span class="ruby-identifier">constantize</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">name</span>)
18
+ <span class="ruby-identifier">adapter</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">Base</span>.<span class="ruby-identifier">get_options</span>(<span class="ruby-identifier">name</span>)[<span class="ruby-value str">&quot;adapter&quot;</span>].<span class="ruby-identifier">camelcase</span>
19
+ <span class="ruby-identifier">conn</span> = <span class="ruby-node">&quot;Cachetastic::Adapters::#{adapter}&quot;</span>.<span class="ruby-identifier">constantize</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">name</span>)
20
20
  <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">connections</span>[<span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_sym</span>] = <span class="ruby-identifier">conn</span>
21
21
  <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">conn</span>
22
22
  <span class="ruby-keyword kw">end</span></pre>