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.
Files changed (110) hide show
  1. data/README +3 -1
  2. data/doc/classes/ActiveRecord/Base.html +22 -2
  3. data/doc/classes/ActiveRecord/Base.src/M000001.html +1 -1
  4. data/doc/classes/ActiveRecord/Base.src/M000002.html +1 -1
  5. data/doc/classes/ActiveRecord/Base.src/M000003.html +1 -1
  6. data/doc/classes/ActiveRecord/Base.src/M000004.html +1 -1
  7. data/doc/classes/ActiveRecord/Base.src/M000005.html +1 -1
  8. data/doc/classes/{Cachetastic/Stores.html → CGI/Session/CachetasticStore.html} +23 -14
  9. data/doc/classes/Cachetastic/Caches/Base/RegisteredCaches.html +17 -6
  10. data/doc/classes/Cachetastic/Caches/Base/RegisteredCaches.src/{M000044.html → M000043.html} +1 -1
  11. data/doc/classes/Cachetastic/Caches/Base.html +148 -54
  12. data/doc/classes/Cachetastic/Caches/Base.src/{M000043.html → M000032.html} +4 -4
  13. data/doc/classes/Cachetastic/Caches/Base.src/M000033.html +14 -4
  14. data/doc/classes/Cachetastic/Caches/Base.src/M000034.html +9 -6
  15. data/doc/classes/Cachetastic/Caches/Base.src/M000035.html +5 -13
  16. data/doc/classes/Cachetastic/Caches/Base.src/M000036.html +5 -18
  17. data/doc/classes/Cachetastic/Caches/Base.src/M000037.html +4 -6
  18. data/doc/classes/Cachetastic/Caches/Base.src/M000038.html +4 -5
  19. data/doc/classes/Cachetastic/Caches/Base.src/M000039.html +4 -4
  20. data/doc/classes/Cachetastic/Caches/Base.src/M000040.html +4 -4
  21. data/doc/classes/Cachetastic/Caches/Base.src/M000041.html +4 -4
  22. data/doc/classes/Cachetastic/Caches/Base.src/M000042.html +14 -4
  23. data/doc/classes/Cachetastic/Caches/PageCache.html +8 -0
  24. data/doc/classes/Cachetastic/Caches/RailsSessionCache.html +6 -0
  25. data/doc/classes/Cachetastic/Connection.html +14 -14
  26. data/doc/classes/Cachetastic/Connection.src/M000044.html +18 -0
  27. data/doc/classes/Cachetastic/Connection.src/M000045.html +10 -4
  28. data/doc/classes/Cachetastic/Logger.html +5 -5
  29. data/doc/classes/Cachetastic/Stores/Base.html +68 -45
  30. data/doc/classes/Cachetastic/Stores/Base.src/{M000028.html → M000023.html} +1 -1
  31. data/doc/classes/Cachetastic/Stores/Base.src/{M000030.html → M000024.html} +1 -1
  32. data/doc/classes/Cachetastic/Stores/Base.src/{M000032.html → M000025.html} +1 -1
  33. data/doc/classes/Cachetastic/Stores/File.html +265 -0
  34. data/doc/classes/Cachetastic/Stores/File.src/M000026.html +18 -0
  35. data/doc/classes/Cachetastic/Stores/File.src/M000027.html +20 -0
  36. data/doc/classes/Cachetastic/Stores/File.src/M000028.html +19 -0
  37. data/doc/classes/Cachetastic/Stores/File.src/M000029.html +33 -0
  38. data/doc/classes/Cachetastic/Stores/File.src/M000030.html +21 -0
  39. data/doc/classes/Cachetastic/Stores/{LocalMemory.src/M000025.html → File.src/M000031.html} +3 -3
  40. data/doc/classes/Cachetastic/Stores/LocalMemory.html +41 -36
  41. data/doc/classes/Cachetastic/Stores/{Base.src/M000029.html → LocalMemory.src/M000017.html} +3 -3
  42. data/doc/classes/Cachetastic/Stores/LocalMemory.src/M000018.html +18 -0
  43. data/doc/classes/Cachetastic/Stores/LocalMemory.src/M000019.html +18 -0
  44. data/doc/classes/Cachetastic/Stores/LocalMemory.src/M000020.html +12 -4
  45. data/doc/classes/Cachetastic/Stores/LocalMemory.src/M000021.html +4 -4
  46. data/doc/classes/Cachetastic/Stores/LocalMemory.src/M000022.html +11 -4
  47. data/doc/classes/Cachetastic/Stores/Memcache.html +85 -59
  48. data/doc/classes/Cachetastic/Stores/Memcache.src/M000006.html +19 -0
  49. data/doc/classes/Cachetastic/Stores/{LocalMemory.src/M000024.html → Memcache.src/M000007.html} +3 -3
  50. data/doc/classes/Cachetastic/Stores/Memcache.src/M000008.html +18 -0
  51. data/doc/classes/Cachetastic/Stores/Memcache.src/M000009.html +4 -5
  52. data/doc/classes/Cachetastic/Stores/Memcache.src/M000010.html +4 -4
  53. data/doc/classes/Cachetastic/Stores/Memcache.src/M000011.html +4 -4
  54. data/doc/classes/Cachetastic/Stores/Memcache.src/M000012.html +10 -4
  55. data/doc/classes/Cachetastic/Stores/Memcache.src/M000013.html +5 -4
  56. data/doc/classes/Cachetastic/Stores/Memcache.src/M000014.html +6 -4
  57. data/doc/classes/Cachetastic/Stores/Memcache.src/M000015.html +6 -5
  58. data/doc/classes/Cachetastic/Stores/Memcache.src/M000016.html +9 -9
  59. data/doc/created.rid +1 -1
  60. data/doc/files/init_rb.html +111 -1
  61. data/doc/files/lib/caches/cachetastic_caches_base_rb.html +1 -1
  62. data/doc/files/lib/caches/cachetastic_caches_page_cache_rb.html +9 -1
  63. data/doc/files/lib/caches/cachetastic_caches_rails_session_cache_rb.html +7 -1
  64. data/doc/files/lib/cachetastic_connection_rb.html +1 -1
  65. data/doc/files/lib/cachetastic_rb.html +6 -2
  66. data/doc/files/lib/helpers/cachetastic_helpers_active_record_rb.html +1 -1
  67. data/doc/files/lib/rails_extensions/cachetastic_active_record_base_rb.html +1 -1
  68. data/doc/files/lib/rails_extensions/cgi_session_cachetastic_store_rb.html +1 -1
  69. data/doc/files/lib/stores/cachetastic_stores_base_rb.html +39 -1
  70. data/doc/{classes/ActiveRecord.html → files/lib/stores/cachetastic_stores_file_rb.html} +36 -22
  71. data/doc/files/lib/stores/cachetastic_stores_local_memory_rb.html +9 -1
  72. data/doc/files/lib/stores/cachetastic_stores_memcache_rb.html +27 -1
  73. data/doc/{classes/Cachetastic/Caches/ActiveRecord.html → files/lib/stores/cachetastic_stores_store_object_rb.html} +15 -19
  74. data/doc/fr_class_index.html +2 -8
  75. data/doc/fr_file_index.html +2 -0
  76. data/doc/fr_method_index.html +41 -42
  77. data/doc/index.html +2 -2
  78. data/init.rb +1 -0
  79. data/lib/caches/cachetastic_caches_base.rb +81 -18
  80. data/lib/caches/cachetastic_caches_page_cache.rb +4 -0
  81. data/lib/caches/cachetastic_caches_rails_session_cache.rb +1 -0
  82. data/lib/cachetastic.rb +10 -6
  83. data/lib/cachetastic_connection.rb +2 -2
  84. data/lib/helpers/cachetastic_helpers_active_record.rb +12 -1
  85. data/lib/rails_extensions/cachetastic_active_record_base.rb +10 -0
  86. data/lib/rails_extensions/cgi_session_cachetastic_store.rb +15 -10
  87. data/lib/stores/cachetastic_stores_base.rb +33 -13
  88. data/lib/stores/cachetastic_stores_file.rb +101 -0
  89. data/lib/stores/cachetastic_stores_local_memory.rb +6 -27
  90. data/lib/stores/cachetastic_stores_memcache.rb +24 -5
  91. data/lib/stores/cachetastic_stores_store_object.rb +28 -0
  92. data/lib/tasks/rubyforge_config.yml +1 -1
  93. metadata +28 -32
  94. data/doc/classes/Cachetastic/Caches.html +0 -114
  95. data/doc/classes/Cachetastic/Connection.src/M000046.html +0 -24
  96. data/doc/classes/Cachetastic/Helpers/ActiveRecord.html +0 -165
  97. data/doc/classes/Cachetastic/Helpers/ActiveRecord.src/M000006.html +0 -29
  98. data/doc/classes/Cachetastic/Helpers/ActiveRecord.src/M000007.html +0 -23
  99. data/doc/classes/Cachetastic/Helpers/ActiveRecord.src/M000008.html +0 -18
  100. data/doc/classes/Cachetastic/Helpers.html +0 -115
  101. data/doc/classes/Cachetastic/Stores/Base.src/M000031.html +0 -22
  102. data/doc/classes/Cachetastic/Stores/LocalMemory/StoreObject.html +0 -177
  103. data/doc/classes/Cachetastic/Stores/LocalMemory/StoreObject.src/M000026.html +0 -27
  104. data/doc/classes/Cachetastic/Stores/LocalMemory/StoreObject.src/M000027.html +0 -19
  105. data/doc/classes/Cachetastic/Stores/LocalMemory.src/M000023.html +0 -26
  106. data/doc/classes/Cachetastic/Stores/Memcache.src/M000017.html +0 -20
  107. data/doc/classes/Cachetastic/Stores/Memcache.src/M000018.html +0 -20
  108. data/doc/classes/Cachetastic/Stores/Memcache.src/M000019.html +0 -24
  109. data/doc/classes/Cachetastic.html +0 -119
  110. /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>valid? (Cachetastic::Stores::Memcache)</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 33</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">&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>))
17
- <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>
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">&quot;\n&quot;</span>)
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
- Thu, 10 Jan 2008 16:34:40 -0500
1
+ Wed, 16 Jan 2008 12:55:57 -0500
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Tue Jan 08 13:17:00 -0500 2008</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: &lt;%= 24.hours %&gt; # 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: &lt;%= 15.minutes %&gt; # 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: &lt;%= 1.hour %&gt;
147
+ expiry_swing: &lt;%= 15.minutes %&gt;
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: &lt;%= 30.minutes %&gt;
155
+ </pre>
156
+ <h1>Examples:</h1>
157
+ <pre>
158
+ class MyAwesomeCache &lt; Cachetastic::Caches::Base
159
+ end
160
+
161
+ MyAwesomeCache.set(1, [1,2,3])
162
+ MyAwesomeCache.get(1) # =&gt; [1,2,3]
163
+
164
+ class MyAwesomeCache &lt; Cachetastic::Caches::Base
165
+ class &lt;&lt; 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) # =&gt; 8
177
+ MyAwesomeCache.get(1, 4, 4) # =&gt; 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>Thu Jan 10 16:34:23 -0500 2008</td>
59
+ <td>Wed Jan 16 12:54:51 -0500 2008</td>
60
60
  </tr>
61
61
  </table>
62
62
  </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>Tue Jan 08 13:17:00 -0500 2008</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&#8230;
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>Tue Jan 08 13:17:00 -0500 2008</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 02 21:36:27 -0500 2008</td>
59
+ <td>Wed Jan 16 12:54:51 -0500 2008</td>
60
60
  </tr>
61
61
  </table>
62
62
  </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 02 21:36:27 -0500 2008</td>
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&nbsp;&nbsp;
195
197
  caches/cachetastic_caches_rails_session_cache&nbsp;&nbsp;
196
198
  stores/cachetastic_stores_base&nbsp;&nbsp;
199
+ stores/cachetastic_stores_store_object&nbsp;&nbsp;
197
200
  stores/cachetastic_stores_memcache&nbsp;&nbsp;
198
201
  stores/cachetastic_stores_local_memory&nbsp;&nbsp;
202
+ stores/cachetastic_stores_file&nbsp;&nbsp;
199
203
  helpers/cachetastic_helpers_active_record&nbsp;&nbsp;
200
204
  rails_extensions/cachetastic_active_record_base&nbsp;&nbsp;
201
205
  rails_extensions/cgi_session_cachetastic_store&nbsp;&nbsp;
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Thu Dec 27 14:48:41 -0500 2007</td>
59
+ <td>Wed Jan 16 12:54:51 -0500 2008</td>
60
60
  </tr>
61
61
  </table>
62
62
  </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>Thu Dec 27 14:49:05 -0500 2007</td>
59
+ <td>Wed Jan 16 12:54:51 -0500 2008</td>
60
60
  </tr>
61
61
  </table>
62
62
  </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 Dec 26 14:31:53 -0500 2007</td>
59
+ <td>Wed Jan 16 12:54:51 -0500 2008</td>
60
60
  </tr>
61
61
  </table>
62
62
  </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>Thu Jan 10 14:13:08 -0500 2008</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&#8230; 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>Module: ActiveRecord</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=".././rdoc-style.css" type="text/css" media="screen" />
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
- <div id="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Module</strong></td>
53
- <td class="class-name-in-header">ActiveRecord</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- </td>
59
- </tr>
60
-
61
- </table>
62
- </div>
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&#8216;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: &lt;%= 24.hours %&gt;
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>Fri Dec 28 14:03:29 -0500 2007</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&#8216;t be put into production.
75
+ It&#8216;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 02 21:36:26 -0500 2008</td>
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&#8216;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: &lt;%= 24.hours %&gt;
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>Module: Cachetastic::Caches::ActiveRecord</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
- <div id="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Module</strong></td>
53
- <td class="class-name-in-header">Cachetastic::Caches::ActiveRecord</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../../files/lib/cachetastic_rb.html">
59
- lib/cachetastic.rb
60
- </a>
61
- <br />
62
- </td>
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">
@@ -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/Cachetastic.html">Cachetastic</a><br />
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>
@@ -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>