cachetastic 1.1.3 → 1.1.8
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 +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
|
@@ -5,20 +5,20 @@
|
|
|
5
5
|
|
|
6
6
|
<html>
|
|
7
7
|
<head>
|
|
8
|
-
<title>
|
|
8
|
+
<title>get_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-
|
|
16
|
-
|
|
17
|
-
<span class="ruby-keyword kw">
|
|
18
|
-
<span class="ruby-identifier">
|
|
19
|
-
<span class="ruby-identifier">
|
|
20
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/stores/cachetastic_stores_memcache.rb, line 78</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_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-keyword kw">self</span>.<span class="ruby-identifier">ns_versions</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">name</span>)
|
|
17
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">v</span>.<span class="ruby-identifier">nil?</span>
|
|
18
|
+
<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-value">1</span>)
|
|
19
|
+
<span class="ruby-identifier">v</span> = <span class="ruby-value">1</span>
|
|
21
20
|
<span class="ruby-keyword kw">end</span>
|
|
21
|
+
<span class="ruby-identifier">v</span>
|
|
22
22
|
<span class="ruby-keyword kw">end</span></pre>
|
|
23
23
|
</body>
|
|
24
24
|
</html>
|
data/doc/created.rid
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
Wed, 16 Jan 2008 12:55:57 -0500
|
data/doc/files/init_rb.html
CHANGED
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
</tr>
|
|
57
57
|
<tr class="top-aligned-row">
|
|
58
58
|
<td><strong>Last Update:</strong></td>
|
|
59
|
-
<td>
|
|
59
|
+
<td>Wed Jan 16 12:54:51 -0500 2008</td>
|
|
60
60
|
</tr>
|
|
61
61
|
</table>
|
|
62
62
|
</div>
|
|
@@ -68,6 +68,116 @@
|
|
|
68
68
|
|
|
69
69
|
<div id="contextContent">
|
|
70
70
|
|
|
71
|
+
<div id="description">
|
|
72
|
+
<h1>Gem Requirements:</h1>
|
|
73
|
+
<ul>
|
|
74
|
+
<li>Application Configuration
|
|
75
|
+
|
|
76
|
+
</li>
|
|
77
|
+
<li>Ruby Extensions
|
|
78
|
+
|
|
79
|
+
</li>
|
|
80
|
+
<li>Rails Extensions
|
|
81
|
+
|
|
82
|
+
</li>
|
|
83
|
+
</ul>
|
|
84
|
+
<h1>Configuration:</h1>
|
|
85
|
+
<pre>
|
|
86
|
+
cachetastic_default_options:
|
|
87
|
+
# this will dump into the log, configuration info for each cache, as well as the .inspect
|
|
88
|
+
# for each object returned from the cache
|
|
89
|
+
debug: true # true | false (default: false)
|
|
90
|
+
# this is the type of file store to be used for this cache.
|
|
91
|
+
# more stores can be developed and plugged in as desired
|
|
92
|
+
store: local_memory # local_memory | memcache | file (default: local_memory)
|
|
93
|
+
# this will marshall objects into and out of the store.
|
|
94
|
+
# so far yaml is the only supported marshall format.
|
|
95
|
+
marshall_method: none # none | yaml (default: none)
|
|
96
|
+
# this sets how long objects will live in the cache before they are auto expired.
|
|
97
|
+
default_expiry: <%= 24.hours %> # time in seconds (default: 24 hours)
|
|
98
|
+
# when setting objects into the cache the expiry_swing is +/- to the expiry time.
|
|
99
|
+
# example: if the expiry time is 1 hour, and the swing is 15 minutes,
|
|
100
|
+
# objects will go into the cache with an expiry time sometime between 45 mins and 75 mins.
|
|
101
|
+
expiry_swing: <%= 15.minutes %> # time in seconds (default: 0)
|
|
102
|
+
# these options get passed on directly to the store.
|
|
103
|
+
# only the memcache store uses these options currently.
|
|
104
|
+
store_options: # listed below are options for memcache
|
|
105
|
+
c_threshold: 10_000
|
|
106
|
+
compression: true
|
|
107
|
+
debug: false
|
|
108
|
+
readonly: false
|
|
109
|
+
urlencode: false
|
|
110
|
+
store_options: # listed below are the options for file
|
|
111
|
+
dir: /cachetastic/caches/ # absolute path to the directory where caches should be stored.
|
|
112
|
+
# configure logging for this cache:
|
|
113
|
+
logging:
|
|
114
|
+
# n number of logs can be configured for a cache
|
|
115
|
+
# their names can be anything you want, it's doesn't matter
|
|
116
|
+
logger_1:
|
|
117
|
+
# this sets the type of log you want to write to.
|
|
118
|
+
# right now the only two options are file and console
|
|
119
|
+
type: file # console | file (default: none)
|
|
120
|
+
# if the type is file, you need to configure where the log file is to be written.
|
|
121
|
+
file: log/memcached.log # relative | absolute path to log file
|
|
122
|
+
# this sets the level of logging for this cache
|
|
123
|
+
level: info # debug | info | warn | error | fatal (default: info)
|
|
124
|
+
logger_2:
|
|
125
|
+
# this sets the type of log you want to write to.
|
|
126
|
+
# right now the only two options are file and console
|
|
127
|
+
type: console # console | file (default: none)
|
|
128
|
+
# this sets the level of logging for this cache
|
|
129
|
+
level: error # debug | info | warn | error | fatal (default: info)
|
|
130
|
+
# set the servers to be used for memcache
|
|
131
|
+
servers:
|
|
132
|
+
- 127.0.0.1:11211 # ip:port used for memcache
|
|
133
|
+
</pre>
|
|
134
|
+
<p>
|
|
135
|
+
# if using the mongrel_page_cache_handler gem, you can configure it to use
|
|
136
|
+
cachetastic.
|
|
137
|
+
</p>
|
|
138
|
+
<pre>
|
|
139
|
+
page_cache_storage: cachetastic # disk | cachetastic (default: cachetastic)
|
|
140
|
+
</pre>
|
|
141
|
+
<p>
|
|
142
|
+
# example of how to override options for page cacheing:
|
|
143
|
+
</p>
|
|
144
|
+
<pre>
|
|
145
|
+
cachetastic_caches_page_cache_options:
|
|
146
|
+
default_expiry: <%= 1.hour %>
|
|
147
|
+
expiry_swing: <%= 15.minutes %>
|
|
148
|
+
</pre>
|
|
149
|
+
<p>
|
|
150
|
+
# example of how to override options for rails session cacheing:
|
|
151
|
+
</p>
|
|
152
|
+
<pre>
|
|
153
|
+
cachetastic_caches_rails_session_cache_options:
|
|
154
|
+
default_expiry: <%= 30.minutes %>
|
|
155
|
+
</pre>
|
|
156
|
+
<h1>Examples:</h1>
|
|
157
|
+
<pre>
|
|
158
|
+
class MyAwesomeCache < Cachetastic::Caches::Base
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
MyAwesomeCache.set(1, [1,2,3])
|
|
162
|
+
MyAwesomeCache.get(1) # => [1,2,3]
|
|
163
|
+
|
|
164
|
+
class MyAwesomeCache < Cachetastic::Caches::Base
|
|
165
|
+
class << self
|
|
166
|
+
def get(key, x, y)
|
|
167
|
+
super(key) do
|
|
168
|
+
n = x + y
|
|
169
|
+
set(key, n)
|
|
170
|
+
n
|
|
171
|
+
end
|
|
172
|
+
end
|
|
173
|
+
end
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
MyAwesomeCache.get(1, 2, 4) # => 8
|
|
177
|
+
MyAwesomeCache.get(1, 4, 4) # => 8
|
|
178
|
+
</pre>
|
|
179
|
+
|
|
180
|
+
</div>
|
|
71
181
|
|
|
72
182
|
|
|
73
183
|
</div>
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
</tr>
|
|
57
57
|
<tr class="top-aligned-row">
|
|
58
58
|
<td><strong>Last Update:</strong></td>
|
|
59
|
-
<td>
|
|
59
|
+
<td>Wed Jan 16 12:54:51 -0500 2008</td>
|
|
60
60
|
</tr>
|
|
61
61
|
</table>
|
|
62
62
|
</div>
|
|
@@ -68,6 +68,14 @@
|
|
|
68
68
|
|
|
69
69
|
<div id="contextContent">
|
|
70
70
|
|
|
71
|
+
<div id="description">
|
|
72
|
+
<p>
|
|
73
|
+
Used by the Mongrel Page Cache Handler gem for page caching. Future
|
|
74
|
+
functionality may be added to this class to allow for things such as
|
|
75
|
+
deleting a certain page/set of pages based on regex, etc…
|
|
76
|
+
</p>
|
|
77
|
+
|
|
78
|
+
</div>
|
|
71
79
|
|
|
72
80
|
|
|
73
81
|
</div>
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
</tr>
|
|
57
57
|
<tr class="top-aligned-row">
|
|
58
58
|
<td><strong>Last Update:</strong></td>
|
|
59
|
-
<td>
|
|
59
|
+
<td>Wed Jan 16 12:54:51 -0500 2008</td>
|
|
60
60
|
</tr>
|
|
61
61
|
</table>
|
|
62
62
|
</div>
|
|
@@ -68,6 +68,12 @@
|
|
|
68
68
|
|
|
69
69
|
<div id="contextContent">
|
|
70
70
|
|
|
71
|
+
<div id="description">
|
|
72
|
+
<p>
|
|
73
|
+
Used for storing Rails sessions.
|
|
74
|
+
</p>
|
|
75
|
+
|
|
76
|
+
</div>
|
|
71
77
|
|
|
72
78
|
|
|
73
79
|
</div>
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
</tr>
|
|
57
57
|
<tr class="top-aligned-row">
|
|
58
58
|
<td><strong>Last Update:</strong></td>
|
|
59
|
-
<td>Wed Jan
|
|
59
|
+
<td>Wed Jan 16 12:54:51 -0500 2008</td>
|
|
60
60
|
</tr>
|
|
61
61
|
</table>
|
|
62
62
|
</div>
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
debug: true # true | false (default: false)
|
|
90
90
|
# this is the type of file store to be used for this cache.
|
|
91
91
|
# more stores can be developed and plugged in as desired
|
|
92
|
-
store: local_memory # local_memory | memcache (default: local_memory)
|
|
92
|
+
store: local_memory # local_memory | memcache | file (default: local_memory)
|
|
93
93
|
# this will marshall objects into and out of the store.
|
|
94
94
|
# so far yaml is the only supported marshall format.
|
|
95
95
|
marshall_method: none # none | yaml (default: none)
|
|
@@ -107,6 +107,8 @@
|
|
|
107
107
|
debug: false
|
|
108
108
|
readonly: false
|
|
109
109
|
urlencode: false
|
|
110
|
+
store_options: # listed below are the options for file
|
|
111
|
+
dir: /cachetastic/caches/ # absolute path to the directory where caches should be stored.
|
|
110
112
|
# configure logging for this cache:
|
|
111
113
|
logging:
|
|
112
114
|
# n number of logs can be configured for a cache
|
|
@@ -194,8 +196,10 @@ cachetastic.
|
|
|
194
196
|
caches/cachetastic_caches_page_cache
|
|
195
197
|
caches/cachetastic_caches_rails_session_cache
|
|
196
198
|
stores/cachetastic_stores_base
|
|
199
|
+
stores/cachetastic_stores_store_object
|
|
197
200
|
stores/cachetastic_stores_memcache
|
|
198
201
|
stores/cachetastic_stores_local_memory
|
|
202
|
+
stores/cachetastic_stores_file
|
|
199
203
|
helpers/cachetastic_helpers_active_record
|
|
200
204
|
rails_extensions/cachetastic_active_record_base
|
|
201
205
|
rails_extensions/cgi_session_cachetastic_store
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
</tr>
|
|
57
57
|
<tr class="top-aligned-row">
|
|
58
58
|
<td><strong>Last Update:</strong></td>
|
|
59
|
-
<td>
|
|
59
|
+
<td>Wed Jan 16 12:54:51 -0500 2008</td>
|
|
60
60
|
</tr>
|
|
61
61
|
</table>
|
|
62
62
|
</div>
|
|
@@ -68,6 +68,44 @@
|
|
|
68
68
|
|
|
69
69
|
<div id="contextContent">
|
|
70
70
|
|
|
71
|
+
<div id="description">
|
|
72
|
+
<p>
|
|
73
|
+
This class is the interface used to develop stores for caches. Stores are
|
|
74
|
+
where the data is actually held. These could be local memory, memcached, a
|
|
75
|
+
database, the file system, etc… If you implement this API, then you
|
|
76
|
+
should be able to plug in different stores for your caches without having
|
|
77
|
+
to change any of your code.
|
|
78
|
+
</p>
|
|
79
|
+
<h3>Methods that need to be implemented:</h3>
|
|
80
|
+
<ul>
|
|
81
|
+
<li>setup - used to setup the implementation of the store.
|
|
82
|
+
|
|
83
|
+
</li>
|
|
84
|
+
<li>set(key, object, expiry) - sets an object into the store using the given
|
|
85
|
+
key and the expiry time.
|
|
86
|
+
|
|
87
|
+
</li>
|
|
88
|
+
<li>get(key) - returns an object from the store for a given key.
|
|
89
|
+
|
|
90
|
+
</li>
|
|
91
|
+
<li>delete(key, delay) - deletes an object from the store for a given key. If
|
|
92
|
+
the store supports it, a delay can be used.
|
|
93
|
+
|
|
94
|
+
</li>
|
|
95
|
+
<li>expire_all - expires all objects in the store for a given cache.
|
|
96
|
+
|
|
97
|
+
</li>
|
|
98
|
+
<li>stats - returns statistics for the store.
|
|
99
|
+
|
|
100
|
+
</li>
|
|
101
|
+
<li>valid? - used to test whether or not the store is still valid. If this
|
|
102
|
+
returns false a new instance of the store is created by <a
|
|
103
|
+
href="../../../classes/Cachetastic/Connection.html">Cachetastic::Connection</a>
|
|
104
|
+
|
|
105
|
+
</li>
|
|
106
|
+
</ul>
|
|
107
|
+
|
|
108
|
+
</div>
|
|
71
109
|
|
|
72
110
|
|
|
73
111
|
</div>
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
|
|
6
6
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
7
7
|
<head>
|
|
8
|
-
<title>
|
|
8
|
+
<title>File: cachetastic_stores_file.rb</title>
|
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
10
|
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
|
11
|
-
<link rel="stylesheet" href="
|
|
11
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
12
12
|
<script type="text/javascript">
|
|
13
13
|
// <![CDATA[
|
|
14
14
|
|
|
@@ -46,20 +46,20 @@
|
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
49
|
+
<div id="fileHeader">
|
|
50
|
+
<h1>cachetastic_stores_file.rb</h1>
|
|
51
|
+
<table class="header-table">
|
|
52
|
+
<tr class="top-aligned-row">
|
|
53
|
+
<td><strong>Path:</strong></td>
|
|
54
|
+
<td>lib/stores/cachetastic_stores_file.rb
|
|
55
|
+
</td>
|
|
56
|
+
</tr>
|
|
57
|
+
<tr class="top-aligned-row">
|
|
58
|
+
<td><strong>Last Update:</strong></td>
|
|
59
|
+
<td>Wed Jan 16 12:54:51 -0500 2008</td>
|
|
60
|
+
</tr>
|
|
61
|
+
</table>
|
|
62
|
+
</div>
|
|
63
63
|
<!-- banner header -->
|
|
64
64
|
|
|
65
65
|
<div id="bodyContent">
|
|
@@ -68,6 +68,26 @@
|
|
|
68
68
|
|
|
69
69
|
<div id="contextContent">
|
|
70
70
|
|
|
71
|
+
<div id="description">
|
|
72
|
+
<p>
|
|
73
|
+
This store uses the file system as it‘s backing. The configuration
|
|
74
|
+
for this should look something like this:
|
|
75
|
+
</p>
|
|
76
|
+
<pre>
|
|
77
|
+
my_awesome_cache_options:
|
|
78
|
+
debug: false
|
|
79
|
+
store: file
|
|
80
|
+
marshall_method: none
|
|
81
|
+
default_expiry: <%= 24.hours %>
|
|
82
|
+
store_options:
|
|
83
|
+
dir: /usr/local/caches/
|
|
84
|
+
logging:
|
|
85
|
+
logger_1:
|
|
86
|
+
type: file
|
|
87
|
+
file: log/file_store_cache.log
|
|
88
|
+
</pre>
|
|
89
|
+
|
|
90
|
+
</div>
|
|
71
91
|
|
|
72
92
|
|
|
73
93
|
</div>
|
|
@@ -80,12 +100,6 @@
|
|
|
80
100
|
|
|
81
101
|
<div id="section">
|
|
82
102
|
|
|
83
|
-
<div id="class-list">
|
|
84
|
-
<h3 class="section-bar">Classes and Modules</h3>
|
|
85
|
-
|
|
86
|
-
Class <a href="ActiveRecord/Base.html" class="link">ActiveRecord::Base</a><br />
|
|
87
|
-
|
|
88
|
-
</div>
|
|
89
103
|
|
|
90
104
|
|
|
91
105
|
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
</tr>
|
|
57
57
|
<tr class="top-aligned-row">
|
|
58
58
|
<td><strong>Last Update:</strong></td>
|
|
59
|
-
<td>
|
|
59
|
+
<td>Wed Jan 16 12:54:51 -0500 2008</td>
|
|
60
60
|
</tr>
|
|
61
61
|
</table>
|
|
62
62
|
</div>
|
|
@@ -68,6 +68,14 @@
|
|
|
68
68
|
|
|
69
69
|
<div id="contextContent">
|
|
70
70
|
|
|
71
|
+
<div id="description">
|
|
72
|
+
<p>
|
|
73
|
+
A store that keeps objects in local memory. This is great for
|
|
74
|
+
development/testing, but probably shouldn‘t be put into production.
|
|
75
|
+
It‘s also a very good example of how to write a store.
|
|
76
|
+
</p>
|
|
77
|
+
|
|
78
|
+
</div>
|
|
71
79
|
|
|
72
80
|
|
|
73
81
|
</div>
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
</tr>
|
|
57
57
|
<tr class="top-aligned-row">
|
|
58
58
|
<td><strong>Last Update:</strong></td>
|
|
59
|
-
<td>Wed Jan
|
|
59
|
+
<td>Wed Jan 16 12:54:51 -0500 2008</td>
|
|
60
60
|
</tr>
|
|
61
61
|
</table>
|
|
62
62
|
</div>
|
|
@@ -68,6 +68,32 @@
|
|
|
68
68
|
|
|
69
69
|
<div id="contextContent">
|
|
70
70
|
|
|
71
|
+
<div id="description">
|
|
72
|
+
<p>
|
|
73
|
+
This store uses Memcache as it‘s backing. The configuration for this
|
|
74
|
+
should look something like this:
|
|
75
|
+
</p>
|
|
76
|
+
<pre>
|
|
77
|
+
my_awesome_cache_options:
|
|
78
|
+
debug: false
|
|
79
|
+
store: memcache
|
|
80
|
+
marshall_method: none
|
|
81
|
+
default_expiry: <%= 24.hours %>
|
|
82
|
+
store_options:
|
|
83
|
+
c_threshold: 10_000
|
|
84
|
+
compression: true
|
|
85
|
+
debug: false
|
|
86
|
+
readonly: false
|
|
87
|
+
urlencode: false
|
|
88
|
+
logging:
|
|
89
|
+
logger_1:
|
|
90
|
+
type: file
|
|
91
|
+
file: log/memcached.log
|
|
92
|
+
servers:
|
|
93
|
+
- 127.0.0.1:11211
|
|
94
|
+
</pre>
|
|
95
|
+
|
|
96
|
+
</div>
|
|
71
97
|
|
|
72
98
|
|
|
73
99
|
</div>
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
7
7
|
<head>
|
|
8
|
-
<title>
|
|
8
|
+
<title>File: cachetastic_stores_store_object.rb</title>
|
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
10
|
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
|
11
11
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
@@ -46,24 +46,20 @@
|
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
</tr>
|
|
64
|
-
|
|
65
|
-
</table>
|
|
66
|
-
</div>
|
|
49
|
+
<div id="fileHeader">
|
|
50
|
+
<h1>cachetastic_stores_store_object.rb</h1>
|
|
51
|
+
<table class="header-table">
|
|
52
|
+
<tr class="top-aligned-row">
|
|
53
|
+
<td><strong>Path:</strong></td>
|
|
54
|
+
<td>lib/stores/cachetastic_stores_store_object.rb
|
|
55
|
+
</td>
|
|
56
|
+
</tr>
|
|
57
|
+
<tr class="top-aligned-row">
|
|
58
|
+
<td><strong>Last Update:</strong></td>
|
|
59
|
+
<td>Wed Jan 16 12:54:51 -0500 2008</td>
|
|
60
|
+
</tr>
|
|
61
|
+
</table>
|
|
62
|
+
</div>
|
|
67
63
|
<!-- banner header -->
|
|
68
64
|
|
|
69
65
|
<div id="bodyContent">
|
data/doc/fr_class_index.html
CHANGED
|
@@ -20,23 +20,17 @@
|
|
|
20
20
|
<div id="index">
|
|
21
21
|
<h1 class="section-bar">Classes</h1>
|
|
22
22
|
<div id="index-entries">
|
|
23
|
-
<a href="classes/ActiveRecord.html">ActiveRecord</a><br />
|
|
24
23
|
<a href="classes/ActiveRecord/Base.html">ActiveRecord::Base</a><br />
|
|
25
|
-
<a href="classes/
|
|
26
|
-
<a href="classes/Cachetastic/Caches.html">Cachetastic::Caches</a><br />
|
|
27
|
-
<a href="classes/Cachetastic/Caches/ActiveRecord.html">Cachetastic::Caches::ActiveRecord</a><br />
|
|
24
|
+
<a href="classes/CGI/Session/CachetasticStore.html">CGI::Session::CachetasticStore</a><br />
|
|
28
25
|
<a href="classes/Cachetastic/Caches/Base.html">Cachetastic::Caches::Base</a><br />
|
|
29
26
|
<a href="classes/Cachetastic/Caches/Base/RegisteredCaches.html">Cachetastic::Caches::Base::RegisteredCaches</a><br />
|
|
30
27
|
<a href="classes/Cachetastic/Caches/PageCache.html">Cachetastic::Caches::PageCache</a><br />
|
|
31
28
|
<a href="classes/Cachetastic/Caches/RailsSessionCache.html">Cachetastic::Caches::RailsSessionCache</a><br />
|
|
32
29
|
<a href="classes/Cachetastic/Connection.html">Cachetastic::Connection</a><br />
|
|
33
|
-
<a href="classes/Cachetastic/Helpers.html">Cachetastic::Helpers</a><br />
|
|
34
|
-
<a href="classes/Cachetastic/Helpers/ActiveRecord.html">Cachetastic::Helpers::ActiveRecord</a><br />
|
|
35
30
|
<a href="classes/Cachetastic/Logger.html">Cachetastic::Logger</a><br />
|
|
36
|
-
<a href="classes/Cachetastic/Stores.html">Cachetastic::Stores</a><br />
|
|
37
31
|
<a href="classes/Cachetastic/Stores/Base.html">Cachetastic::Stores::Base</a><br />
|
|
32
|
+
<a href="classes/Cachetastic/Stores/File.html">Cachetastic::Stores::File</a><br />
|
|
38
33
|
<a href="classes/Cachetastic/Stores/LocalMemory.html">Cachetastic::Stores::LocalMemory</a><br />
|
|
39
|
-
<a href="classes/Cachetastic/Stores/LocalMemory/StoreObject.html">Cachetastic::Stores::LocalMemory::StoreObject</a><br />
|
|
40
34
|
<a href="classes/Cachetastic/Stores/Memcache.html">Cachetastic::Stores::Memcache</a><br />
|
|
41
35
|
</div>
|
|
42
36
|
</div>
|
data/doc/fr_file_index.html
CHANGED
|
@@ -31,8 +31,10 @@
|
|
|
31
31
|
<a href="files/lib/rails_extensions/cachetastic_active_record_base_rb.html">lib/rails_extensions/cachetastic_active_record_base.rb</a><br />
|
|
32
32
|
<a href="files/lib/rails_extensions/cgi_session_cachetastic_store_rb.html">lib/rails_extensions/cgi_session_cachetastic_store.rb</a><br />
|
|
33
33
|
<a href="files/lib/stores/cachetastic_stores_base_rb.html">lib/stores/cachetastic_stores_base.rb</a><br />
|
|
34
|
+
<a href="files/lib/stores/cachetastic_stores_file_rb.html">lib/stores/cachetastic_stores_file.rb</a><br />
|
|
34
35
|
<a href="files/lib/stores/cachetastic_stores_local_memory_rb.html">lib/stores/cachetastic_stores_local_memory.rb</a><br />
|
|
35
36
|
<a href="files/lib/stores/cachetastic_stores_memcache_rb.html">lib/stores/cachetastic_stores_memcache.rb</a><br />
|
|
37
|
+
<a href="files/lib/stores/cachetastic_stores_store_object_rb.html">lib/stores/cachetastic_stores_store_object.rb</a><br />
|
|
36
38
|
</div>
|
|
37
39
|
</div>
|
|
38
40
|
</body>
|