cachetastic 1.1.3 → 1.1.8
Sign up to get free protection for your applications and to get access to all the features.
- data/README +3 -1
- data/doc/classes/ActiveRecord/Base.html +22 -2
- data/doc/classes/ActiveRecord/Base.src/M000001.html +1 -1
- data/doc/classes/ActiveRecord/Base.src/M000002.html +1 -1
- data/doc/classes/ActiveRecord/Base.src/M000003.html +1 -1
- data/doc/classes/ActiveRecord/Base.src/M000004.html +1 -1
- data/doc/classes/ActiveRecord/Base.src/M000005.html +1 -1
- data/doc/classes/{Cachetastic/Stores.html → CGI/Session/CachetasticStore.html} +23 -14
- data/doc/classes/Cachetastic/Caches/Base/RegisteredCaches.html +17 -6
- data/doc/classes/Cachetastic/Caches/Base/RegisteredCaches.src/{M000044.html → M000043.html} +1 -1
- data/doc/classes/Cachetastic/Caches/Base.html +148 -54
- data/doc/classes/Cachetastic/Caches/Base.src/{M000043.html → M000032.html} +4 -4
- data/doc/classes/Cachetastic/Caches/Base.src/M000033.html +14 -4
- data/doc/classes/Cachetastic/Caches/Base.src/M000034.html +9 -6
- data/doc/classes/Cachetastic/Caches/Base.src/M000035.html +5 -13
- data/doc/classes/Cachetastic/Caches/Base.src/M000036.html +5 -18
- data/doc/classes/Cachetastic/Caches/Base.src/M000037.html +4 -6
- data/doc/classes/Cachetastic/Caches/Base.src/M000038.html +4 -5
- data/doc/classes/Cachetastic/Caches/Base.src/M000039.html +4 -4
- data/doc/classes/Cachetastic/Caches/Base.src/M000040.html +4 -4
- data/doc/classes/Cachetastic/Caches/Base.src/M000041.html +4 -4
- data/doc/classes/Cachetastic/Caches/Base.src/M000042.html +14 -4
- data/doc/classes/Cachetastic/Caches/PageCache.html +8 -0
- data/doc/classes/Cachetastic/Caches/RailsSessionCache.html +6 -0
- data/doc/classes/Cachetastic/Connection.html +14 -14
- data/doc/classes/Cachetastic/Connection.src/M000044.html +18 -0
- data/doc/classes/Cachetastic/Connection.src/M000045.html +10 -4
- data/doc/classes/Cachetastic/Logger.html +5 -5
- data/doc/classes/Cachetastic/Stores/Base.html +68 -45
- data/doc/classes/Cachetastic/Stores/Base.src/{M000028.html → M000023.html} +1 -1
- data/doc/classes/Cachetastic/Stores/Base.src/{M000030.html → M000024.html} +1 -1
- data/doc/classes/Cachetastic/Stores/Base.src/{M000032.html → M000025.html} +1 -1
- data/doc/classes/Cachetastic/Stores/File.html +265 -0
- data/doc/classes/Cachetastic/Stores/File.src/M000026.html +18 -0
- data/doc/classes/Cachetastic/Stores/File.src/M000027.html +20 -0
- data/doc/classes/Cachetastic/Stores/File.src/M000028.html +19 -0
- data/doc/classes/Cachetastic/Stores/File.src/M000029.html +33 -0
- data/doc/classes/Cachetastic/Stores/File.src/M000030.html +21 -0
- data/doc/classes/Cachetastic/Stores/{LocalMemory.src/M000025.html → File.src/M000031.html} +3 -3
- data/doc/classes/Cachetastic/Stores/LocalMemory.html +41 -36
- data/doc/classes/Cachetastic/Stores/{Base.src/M000029.html → LocalMemory.src/M000017.html} +3 -3
- data/doc/classes/Cachetastic/Stores/LocalMemory.src/M000018.html +18 -0
- data/doc/classes/Cachetastic/Stores/LocalMemory.src/M000019.html +18 -0
- data/doc/classes/Cachetastic/Stores/LocalMemory.src/M000020.html +12 -4
- data/doc/classes/Cachetastic/Stores/LocalMemory.src/M000021.html +4 -4
- data/doc/classes/Cachetastic/Stores/LocalMemory.src/M000022.html +11 -4
- data/doc/classes/Cachetastic/Stores/Memcache.html +85 -59
- data/doc/classes/Cachetastic/Stores/Memcache.src/M000006.html +19 -0
- data/doc/classes/Cachetastic/Stores/{LocalMemory.src/M000024.html → Memcache.src/M000007.html} +3 -3
- data/doc/classes/Cachetastic/Stores/Memcache.src/M000008.html +18 -0
- data/doc/classes/Cachetastic/Stores/Memcache.src/M000009.html +4 -5
- data/doc/classes/Cachetastic/Stores/Memcache.src/M000010.html +4 -4
- data/doc/classes/Cachetastic/Stores/Memcache.src/M000011.html +4 -4
- data/doc/classes/Cachetastic/Stores/Memcache.src/M000012.html +10 -4
- data/doc/classes/Cachetastic/Stores/Memcache.src/M000013.html +5 -4
- data/doc/classes/Cachetastic/Stores/Memcache.src/M000014.html +6 -4
- data/doc/classes/Cachetastic/Stores/Memcache.src/M000015.html +6 -5
- data/doc/classes/Cachetastic/Stores/Memcache.src/M000016.html +9 -9
- data/doc/created.rid +1 -1
- data/doc/files/init_rb.html +111 -1
- data/doc/files/lib/caches/cachetastic_caches_base_rb.html +1 -1
- data/doc/files/lib/caches/cachetastic_caches_page_cache_rb.html +9 -1
- data/doc/files/lib/caches/cachetastic_caches_rails_session_cache_rb.html +7 -1
- data/doc/files/lib/cachetastic_connection_rb.html +1 -1
- data/doc/files/lib/cachetastic_rb.html +6 -2
- data/doc/files/lib/helpers/cachetastic_helpers_active_record_rb.html +1 -1
- data/doc/files/lib/rails_extensions/cachetastic_active_record_base_rb.html +1 -1
- data/doc/files/lib/rails_extensions/cgi_session_cachetastic_store_rb.html +1 -1
- data/doc/files/lib/stores/cachetastic_stores_base_rb.html +39 -1
- data/doc/{classes/ActiveRecord.html → files/lib/stores/cachetastic_stores_file_rb.html} +36 -22
- data/doc/files/lib/stores/cachetastic_stores_local_memory_rb.html +9 -1
- data/doc/files/lib/stores/cachetastic_stores_memcache_rb.html +27 -1
- data/doc/{classes/Cachetastic/Caches/ActiveRecord.html → files/lib/stores/cachetastic_stores_store_object_rb.html} +15 -19
- data/doc/fr_class_index.html +2 -8
- data/doc/fr_file_index.html +2 -0
- data/doc/fr_method_index.html +41 -42
- data/doc/index.html +2 -2
- data/init.rb +1 -0
- data/lib/caches/cachetastic_caches_base.rb +81 -18
- data/lib/caches/cachetastic_caches_page_cache.rb +4 -0
- data/lib/caches/cachetastic_caches_rails_session_cache.rb +1 -0
- data/lib/cachetastic.rb +10 -6
- data/lib/cachetastic_connection.rb +2 -2
- data/lib/helpers/cachetastic_helpers_active_record.rb +12 -1
- data/lib/rails_extensions/cachetastic_active_record_base.rb +10 -0
- data/lib/rails_extensions/cgi_session_cachetastic_store.rb +15 -10
- data/lib/stores/cachetastic_stores_base.rb +33 -13
- data/lib/stores/cachetastic_stores_file.rb +101 -0
- data/lib/stores/cachetastic_stores_local_memory.rb +6 -27
- data/lib/stores/cachetastic_stores_memcache.rb +24 -5
- data/lib/stores/cachetastic_stores_store_object.rb +28 -0
- data/lib/tasks/rubyforge_config.yml +1 -1
- metadata +28 -32
- data/doc/classes/Cachetastic/Caches.html +0 -114
- data/doc/classes/Cachetastic/Connection.src/M000046.html +0 -24
- data/doc/classes/Cachetastic/Helpers/ActiveRecord.html +0 -165
- data/doc/classes/Cachetastic/Helpers/ActiveRecord.src/M000006.html +0 -29
- data/doc/classes/Cachetastic/Helpers/ActiveRecord.src/M000007.html +0 -23
- data/doc/classes/Cachetastic/Helpers/ActiveRecord.src/M000008.html +0 -18
- data/doc/classes/Cachetastic/Helpers.html +0 -115
- data/doc/classes/Cachetastic/Stores/Base.src/M000031.html +0 -22
- data/doc/classes/Cachetastic/Stores/LocalMemory/StoreObject.html +0 -177
- data/doc/classes/Cachetastic/Stores/LocalMemory/StoreObject.src/M000026.html +0 -27
- data/doc/classes/Cachetastic/Stores/LocalMemory/StoreObject.src/M000027.html +0 -19
- data/doc/classes/Cachetastic/Stores/LocalMemory.src/M000023.html +0 -26
- data/doc/classes/Cachetastic/Stores/Memcache.src/M000017.html +0 -20
- data/doc/classes/Cachetastic/Stores/Memcache.src/M000018.html +0 -20
- data/doc/classes/Cachetastic/Stores/Memcache.src/M000019.html +0 -24
- data/doc/classes/Cachetastic.html +0 -119
- /data/doc/classes/Cachetastic/Logger.src/{M000047.html → M000046.html} +0 -0
@@ -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>expire_all (Cachetastic::Stores::LocalMemory)</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/stores/cachetastic_stores_local_memory.rb, line 16</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">expire_all</span>
|
15
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">local_store</span> = {}
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -5,14 +5,22 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>get (Cachetastic::Stores::LocalMemory)</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_local_memory.rb, line
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
15
|
-
<span class="ruby-keyword kw">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/stores/cachetastic_stores_local_memory.rb, line 21</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">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>]
|
16
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">so</span>
|
17
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">so</span>.<span class="ruby-identifier">invalid?</span>
|
18
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">key</span>)
|
19
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
20
|
+
<span class="ruby-keyword kw">end</span>
|
21
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">so</span>.<span class="ruby-identifier">value</span>
|
22
|
+
<span class="ruby-keyword kw">end</span>
|
23
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
16
24
|
<span class="ruby-keyword kw">end</span></pre>
|
17
25
|
</body>
|
18
26
|
</html>
|
@@ -5,14 +5,14 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>set (Cachetastic::Stores::LocalMemory)</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_local_memory.rb, line
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
15
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">local_store</span> =
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/stores/cachetastic_stores_local_memory.rb, line 33</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-value">0</span>)
|
15
|
+
<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">Stores</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>)
|
16
16
|
<span class="ruby-keyword kw">end</span></pre>
|
17
17
|
</body>
|
18
18
|
</html>
|
@@ -5,14 +5,21 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>delete (Cachetastic::Stores::LocalMemory)</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_local_memory.rb, line
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
15
|
-
<span class="ruby-keyword kw">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/stores/cachetastic_stores_local_memory.rb, line 37</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-keyword kw">if</span> <span class="ruby-identifier">delay</span> <span class="ruby-operator"><=</span> <span class="ruby-value">0</span>
|
16
|
+
<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>)
|
17
|
+
<span class="ruby-keyword kw">else</span>
|
18
|
+
<span class="ruby-identifier">so</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">key</span>)
|
19
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">so</span>
|
20
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">set</span>(<span class="ruby-identifier">so</span>.<span class="ruby-identifier">key</span>, <span class="ruby-identifier">so</span>.<span class="ruby-identifier">value</span>, <span class="ruby-identifier">delay</span>)
|
21
|
+
<span class="ruby-keyword kw">end</span>
|
22
|
+
<span class="ruby-keyword kw">end</span>
|
16
23
|
<span class="ruby-keyword kw">end</span></pre>
|
17
24
|
</body>
|
18
25
|
</html>
|
@@ -80,6 +80,32 @@
|
|
80
80
|
|
81
81
|
<div id="contextContent">
|
82
82
|
|
83
|
+
<div id="description">
|
84
|
+
<p>
|
85
|
+
This store uses <a href="Memcache.html">Memcache</a> as it‘s backing.
|
86
|
+
The configuration for this should look something like this:
|
87
|
+
</p>
|
88
|
+
<pre>
|
89
|
+
my_awesome_cache_options:
|
90
|
+
debug: false
|
91
|
+
store: memcache
|
92
|
+
marshall_method: none
|
93
|
+
default_expiry: <%= 24.hours %>
|
94
|
+
store_options:
|
95
|
+
c_threshold: 10_000
|
96
|
+
compression: true
|
97
|
+
debug: false
|
98
|
+
readonly: false
|
99
|
+
urlencode: false
|
100
|
+
logging:
|
101
|
+
logger_1:
|
102
|
+
type: file
|
103
|
+
file: log/memcached.log
|
104
|
+
servers:
|
105
|
+
- 127.0.0.1:11211
|
106
|
+
</pre>
|
107
|
+
|
108
|
+
</div>
|
83
109
|
|
84
110
|
|
85
111
|
</div>
|
@@ -88,17 +114,17 @@
|
|
88
114
|
<h3 class="section-bar">Methods</h3>
|
89
115
|
|
90
116
|
<div class="name-list">
|
91
|
-
<a href="#
|
92
|
-
<a href="#
|
93
|
-
<a href="#
|
94
|
-
<a href="#
|
95
|
-
<a href="#
|
96
|
-
<a href="#
|
97
|
-
<a href="#
|
98
|
-
<a href="#
|
99
|
-
<a href="#
|
100
|
-
<a href="#
|
101
|
-
<a href="#
|
117
|
+
<a href="#M000008">delete</a>
|
118
|
+
<a href="#M000010">expire_all</a>
|
119
|
+
<a href="#M000009">get</a>
|
120
|
+
<a href="#M000016">get_version</a>
|
121
|
+
<a href="#M000015">increment_version</a>
|
122
|
+
<a href="#M000011">inspect</a>
|
123
|
+
<a href="#M000013">namespace</a>
|
124
|
+
<a href="#M000014">ns_versions</a>
|
125
|
+
<a href="#M000007">set</a>
|
126
|
+
<a href="#M000006">setup</a>
|
127
|
+
<a href="#M000012">valid?</a>
|
102
128
|
</div>
|
103
129
|
</div>
|
104
130
|
|
@@ -138,12 +164,12 @@
|
|
138
164
|
<div id="methods">
|
139
165
|
<h3 class="section-bar">Public Instance methods</h3>
|
140
166
|
|
141
|
-
<div id="method-
|
142
|
-
<a name="
|
167
|
+
<div id="method-M000008" class="method-detail">
|
168
|
+
<a name="M000008"></a>
|
143
169
|
|
144
170
|
<div class="method-heading">
|
145
|
-
<a href="Memcache.src/
|
146
|
-
onclick="popupCode('Memcache.src/
|
171
|
+
<a href="Memcache.src/M000008.html" target="Code" class="method-signature"
|
172
|
+
onclick="popupCode('Memcache.src/M000008.html');return false;">
|
147
173
|
<span class="method-name">delete</span><span class="method-args">(key, delay = 0)</span>
|
148
174
|
</a>
|
149
175
|
</div>
|
@@ -152,12 +178,12 @@
|
|
152
178
|
</div>
|
153
179
|
</div>
|
154
180
|
|
155
|
-
<div id="method-
|
156
|
-
<a name="
|
181
|
+
<div id="method-M000010" class="method-detail">
|
182
|
+
<a name="M000010"></a>
|
157
183
|
|
158
184
|
<div class="method-heading">
|
159
|
-
<a href="Memcache.src/
|
160
|
-
onclick="popupCode('Memcache.src/
|
185
|
+
<a href="Memcache.src/M000010.html" target="Code" class="method-signature"
|
186
|
+
onclick="popupCode('Memcache.src/M000010.html');return false;">
|
161
187
|
<span class="method-name">expire_all</span><span class="method-args">()</span>
|
162
188
|
</a>
|
163
189
|
</div>
|
@@ -166,12 +192,12 @@
|
|
166
192
|
</div>
|
167
193
|
</div>
|
168
194
|
|
169
|
-
<div id="method-
|
170
|
-
<a name="
|
195
|
+
<div id="method-M000009" class="method-detail">
|
196
|
+
<a name="M000009"></a>
|
171
197
|
|
172
198
|
<div class="method-heading">
|
173
|
-
<a href="Memcache.src/
|
174
|
-
onclick="popupCode('Memcache.src/
|
199
|
+
<a href="Memcache.src/M000009.html" target="Code" class="method-signature"
|
200
|
+
onclick="popupCode('Memcache.src/M000009.html');return false;">
|
175
201
|
<span class="method-name">get</span><span class="method-args">(key)</span>
|
176
202
|
</a>
|
177
203
|
</div>
|
@@ -180,12 +206,12 @@
|
|
180
206
|
</div>
|
181
207
|
</div>
|
182
208
|
|
183
|
-
<div id="method-
|
184
|
-
<a name="
|
209
|
+
<div id="method-M000011" class="method-detail">
|
210
|
+
<a name="M000011"></a>
|
185
211
|
|
186
212
|
<div class="method-heading">
|
187
|
-
<a href="Memcache.src/
|
188
|
-
onclick="popupCode('Memcache.src/
|
213
|
+
<a href="Memcache.src/M000011.html" target="Code" class="method-signature"
|
214
|
+
onclick="popupCode('Memcache.src/M000011.html');return false;">
|
189
215
|
<span class="method-name">inspect</span><span class="method-args">()</span>
|
190
216
|
</a>
|
191
217
|
</div>
|
@@ -194,13 +220,13 @@
|
|
194
220
|
</div>
|
195
221
|
</div>
|
196
222
|
|
197
|
-
<div id="method-
|
198
|
-
<a name="
|
223
|
+
<div id="method-M000007" class="method-detail">
|
224
|
+
<a name="M000007"></a>
|
199
225
|
|
200
226
|
<div class="method-heading">
|
201
|
-
<a href="Memcache.src/
|
202
|
-
onclick="popupCode('Memcache.src/
|
203
|
-
<span class="method-name">
|
227
|
+
<a href="Memcache.src/M000007.html" target="Code" class="method-signature"
|
228
|
+
onclick="popupCode('Memcache.src/M000007.html');return false;">
|
229
|
+
<span class="method-name">set</span><span class="method-args">(key, value, expiry = 0)</span>
|
204
230
|
</a>
|
205
231
|
</div>
|
206
232
|
|
@@ -208,13 +234,13 @@
|
|
208
234
|
</div>
|
209
235
|
</div>
|
210
236
|
|
211
|
-
<div id="method-
|
212
|
-
<a name="
|
237
|
+
<div id="method-M000006" class="method-detail">
|
238
|
+
<a name="M000006"></a>
|
213
239
|
|
214
240
|
<div class="method-heading">
|
215
|
-
<a href="Memcache.src/
|
216
|
-
onclick="popupCode('Memcache.src/
|
217
|
-
<span class="method-name">
|
241
|
+
<a href="Memcache.src/M000006.html" target="Code" class="method-signature"
|
242
|
+
onclick="popupCode('Memcache.src/M000006.html');return false;">
|
243
|
+
<span class="method-name">setup</span><span class="method-args">()</span>
|
218
244
|
</a>
|
219
245
|
</div>
|
220
246
|
|
@@ -222,13 +248,13 @@
|
|
222
248
|
</div>
|
223
249
|
</div>
|
224
250
|
|
225
|
-
<div id="method-
|
226
|
-
<a name="
|
251
|
+
<div id="method-M000012" class="method-detail">
|
252
|
+
<a name="M000012"></a>
|
227
253
|
|
228
254
|
<div class="method-heading">
|
229
|
-
<a href="Memcache.src/
|
230
|
-
onclick="popupCode('Memcache.src/
|
231
|
-
<span class="method-name">
|
255
|
+
<a href="Memcache.src/M000012.html" target="Code" class="method-signature"
|
256
|
+
onclick="popupCode('Memcache.src/M000012.html');return false;">
|
257
|
+
<span class="method-name">valid?</span><span class="method-args">()</span>
|
232
258
|
</a>
|
233
259
|
</div>
|
234
260
|
|
@@ -236,13 +262,15 @@
|
|
236
262
|
</div>
|
237
263
|
</div>
|
238
264
|
|
265
|
+
<h3 class="section-bar">Protected Instance methods</h3>
|
266
|
+
|
239
267
|
<div id="method-M000016" class="method-detail">
|
240
268
|
<a name="M000016"></a>
|
241
269
|
|
242
270
|
<div class="method-heading">
|
243
271
|
<a href="Memcache.src/M000016.html" target="Code" class="method-signature"
|
244
272
|
onclick="popupCode('Memcache.src/M000016.html');return false;">
|
245
|
-
<span class="method-name">
|
273
|
+
<span class="method-name">get_version</span><span class="method-args">(name)</span>
|
246
274
|
</a>
|
247
275
|
</div>
|
248
276
|
|
@@ -250,15 +278,13 @@
|
|
250
278
|
</div>
|
251
279
|
</div>
|
252
280
|
|
253
|
-
<
|
254
|
-
|
255
|
-
<div id="method-M000019" class="method-detail">
|
256
|
-
<a name="M000019"></a>
|
281
|
+
<div id="method-M000015" class="method-detail">
|
282
|
+
<a name="M000015"></a>
|
257
283
|
|
258
284
|
<div class="method-heading">
|
259
|
-
<a href="Memcache.src/
|
260
|
-
onclick="popupCode('Memcache.src/
|
261
|
-
<span class="method-name">
|
285
|
+
<a href="Memcache.src/M000015.html" target="Code" class="method-signature"
|
286
|
+
onclick="popupCode('Memcache.src/M000015.html');return false;">
|
287
|
+
<span class="method-name">increment_version</span><span class="method-args">(name)</span>
|
262
288
|
</a>
|
263
289
|
</div>
|
264
290
|
|
@@ -266,13 +292,13 @@
|
|
266
292
|
</div>
|
267
293
|
</div>
|
268
294
|
|
269
|
-
<div id="method-
|
270
|
-
<a name="
|
295
|
+
<div id="method-M000013" class="method-detail">
|
296
|
+
<a name="M000013"></a>
|
271
297
|
|
272
298
|
<div class="method-heading">
|
273
|
-
<a href="Memcache.src/
|
274
|
-
onclick="popupCode('Memcache.src/
|
275
|
-
<span class="method-name">
|
299
|
+
<a href="Memcache.src/M000013.html" target="Code" class="method-signature"
|
300
|
+
onclick="popupCode('Memcache.src/M000013.html');return false;">
|
301
|
+
<span class="method-name">namespace</span><span class="method-args">()</span>
|
276
302
|
</a>
|
277
303
|
</div>
|
278
304
|
|
@@ -280,12 +306,12 @@
|
|
280
306
|
</div>
|
281
307
|
</div>
|
282
308
|
|
283
|
-
<div id="method-
|
284
|
-
<a name="
|
309
|
+
<div id="method-M000014" class="method-detail">
|
310
|
+
<a name="M000014"></a>
|
285
311
|
|
286
312
|
<div class="method-heading">
|
287
|
-
<a href="Memcache.src/
|
288
|
-
onclick="popupCode('Memcache.src/
|
313
|
+
<a href="Memcache.src/M000014.html" target="Code" class="method-signature"
|
314
|
+
onclick="popupCode('Memcache.src/M000014.html');return false;">
|
289
315
|
<span class="method-name">ns_versions</span><span class="method-args">()</span>
|
290
316
|
</a>
|
291
317
|
</div>
|
@@ -0,0 +1,19 @@
|
|
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>setup (Cachetastic::Stores::Memcache)</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/stores/cachetastic_stores_memcache.rb, line 22</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setup</span>
|
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">></span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">namespace</span>}))
|
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>)
|
17
|
+
<span class="ruby-keyword kw">end</span></pre>
|
18
|
+
</body>
|
19
|
+
</html>
|
data/doc/classes/Cachetastic/Stores/{LocalMemory.src/M000024.html → Memcache.src/M000007.html}
RENAMED
@@ -5,14 +5,14 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>set (Cachetastic::Stores::
|
8
|
+
<title>set (Cachetastic::Stores::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/
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/stores/cachetastic_stores_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
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">
|
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>
|
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>delete (Cachetastic::Stores::Memcache)</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/stores/cachetastic_stores_memcache.rb, line 31</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-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
|
+
<span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -5,15 +5,14 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>get (Cachetastic::Stores::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
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
15
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">conn</span
|
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>)
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/stores/cachetastic_stores_memcache.rb, line 35</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-keyword kw">self</span>.<span class="ruby-identifier">conn</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">key</span>)
|
17
16
|
<span class="ruby-keyword kw">end</span></pre>
|
18
17
|
</body>
|
19
18
|
</html>
|
@@ -5,14 +5,14 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>expire_all (Cachetastic::Stores::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
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
15
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/stores/cachetastic_stores_memcache.rb, line 39</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">expire_all</span>
|
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>
|
17
17
|
</body>
|
18
18
|
</html>
|
@@ -5,14 +5,14 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>inspect (Cachetastic::Stores::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
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
15
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">conn</span>.<span class="ruby-identifier">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/stores/cachetastic_stores_memcache.rb, line 43</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">inspect</span>
|
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">" <version: #{self.version}> #{self.conn.stats.inspect}"</span>
|
16
16
|
<span class="ruby-keyword kw">end</span></pre>
|
17
17
|
</body>
|
18
18
|
</html>
|
@@ -5,14 +5,20 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>valid? (Cachetastic::Stores::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
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
15
|
-
<span class="ruby-keyword kw">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/stores/cachetastic_stores_memcache.rb, line 47</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">valid?</span>
|
15
|
+
<span class="ruby-keyword kw">begin</span>
|
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">&&</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>))
|
17
|
+
<span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">e</span>
|
18
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">message</span>
|
19
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">backtrace</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">"\n"</span>)
|
20
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
|
21
|
+
<span class="ruby-keyword kw">end</span>
|
16
22
|
<span class="ruby-keyword kw">end</span></pre>
|
17
23
|
</body>
|
18
24
|
</html>
|
@@ -5,14 +5,15 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>namespace (Cachetastic::Stores::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
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
15
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/stores/cachetastic_stores_memcache.rb, line 61</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">namespace</span>
|
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
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-node">"#{name}.#{v}"</span>
|
16
17
|
<span class="ruby-keyword kw">end</span></pre>
|
17
18
|
</body>
|
18
19
|
</html>
|
@@ -5,14 +5,16 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>ns_versions (Cachetastic::Stores::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
|
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/stores/cachetastic_stores_memcache.rb, line 66</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ns_versions</span>
|
15
|
+
<span class="ruby-identifier">ivar_cache</span> <span class="ruby-keyword kw">do</span>
|
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">></span> <span class="ruby-identifier">:namespace_versions</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,15 +5,16 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>increment_version (Cachetastic::Stores::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
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
15
|
-
<span class="ruby-identifier">
|
16
|
-
<span class="ruby-
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/stores/cachetastic_stores_memcache.rb, line 72</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">increment_version</span>(<span class="ruby-identifier">name</span>)
|
15
|
+
<span class="ruby-identifier">name</span> = <span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_s</span>
|
16
|
+
<span class="ruby-identifier">v</span> = <span class="ruby-identifier">get_version</span>(<span class="ruby-identifier">name</span>)
|
17
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">ns_versions</span>.<span class="ruby-identifier">set</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">v</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>)
|
17
18
|
<span class="ruby-keyword kw">end</span></pre>
|
18
19
|
</body>
|
19
20
|
</html>
|