aub-cache_advance 1.0.7 → 1.0.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/TODO.textile +6 -0
- data/cache_advance.gemspec +1 -1
- data/rails/init.rb +8 -8
- metadata +1 -1
data/TODO.textile
CHANGED
@@ -0,0 +1,6 @@
|
|
1
|
+
- Fix to allow keys of > 256 characters with memcache
|
2
|
+
- Make test coverage not pitiful
|
3
|
+
- Add ability for cache to expire when a specific object changes
|
4
|
+
- Apply plugins only to specific caches
|
5
|
+
- Test with caching strategies other than memcache
|
6
|
+
- Improve documentation
|
data/cache_advance.gemspec
CHANGED
data/rails/init.rb
CHANGED
@@ -21,25 +21,25 @@ if config.action_controller.perform_caching
|
|
21
21
|
end
|
22
22
|
else
|
23
23
|
ActionController::Base.helper do
|
24
|
-
def cache_it(cache, options={})
|
25
|
-
|
24
|
+
def cache_it(cache, options={}, &block)
|
25
|
+
capture(&block)
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
30
|
-
ActionMailer::Base.helper do
|
31
|
-
def cache_it(cache, options={})
|
32
|
-
|
30
|
+
ActionMailer::Base.helper do
|
31
|
+
def cache_it(cache, options={}, &block)
|
32
|
+
capture(&block)
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
36
36
|
# This will get called after the standard rails environment is initialized.
|
37
37
|
config.after_initialize do
|
38
|
-
|
39
|
-
# This hooks the sweepers into the observer system and adds it to the list.
|
38
|
+
|
39
|
+
# This hooks the sweepers into the observer system and adds it to the list.
|
40
40
|
CacheAdvance::Caches.create_sweepers
|
41
41
|
ActiveRecord::Base.observers << CacheAdvance::ActiveRecordSweeper
|
42
|
-
|
42
|
+
|
43
43
|
# In development mode, the models we observe get reloaded with each request. Using
|
44
44
|
# this hook allows us to reload the observer relationships each time as well.
|
45
45
|
ActionController::Dispatcher.to_prepare(:cache_advance_reload) do
|