aub-cache_advance 1.0.8 → 1.0.9

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 (3) hide show
  1. data/cache_advance.gemspec +1 -1
  2. data/rails/init.rb +9 -8
  3. metadata +1 -1
@@ -1,5 +1,5 @@
1
1
  Gem::Specification.new do |s|
2
- s.version = '1.0.8'
2
+ s.version = '1.0.9'
3
3
  s.date = %q{2009-01-08}
4
4
 
5
5
  s.name = %q{cache_advance}
data/rails/init.rb CHANGED
@@ -35,14 +35,15 @@ end
35
35
 
36
36
  # This will get called after the standard rails environment is initialized.
37
37
  config.after_initialize do
38
+ if config.action_controller.perform_caching
39
+ # This hooks the sweepers into the observer system and adds it to the list.
40
+ CacheAdvance::Caches.create_sweepers
41
+ ActiveRecord::Base.observers << CacheAdvance::ActiveRecordSweeper
38
42
 
39
- # This hooks the sweepers into the observer system and adds it to the list.
40
- CacheAdvance::Caches.create_sweepers
41
- ActiveRecord::Base.observers << CacheAdvance::ActiveRecordSweeper
42
-
43
- # In development mode, the models we observe get reloaded with each request. Using
44
- # this hook allows us to reload the observer relationships each time as well.
45
- ActionController::Dispatcher.to_prepare(:cache_advance_reload) do
46
- CacheAdvance::ActiveRecordSweeper.instance.reload_sweeper
43
+ # In development mode, the models we observe get reloaded with each request. Using
44
+ # this hook allows us to reload the observer relationships each time as well.
45
+ ActionController::Dispatcher.to_prepare(:cache_advance_reload) do
46
+ CacheAdvance::ActiveRecordSweeper.instance.reload_sweeper
47
+ end
47
48
  end
48
49
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aub-cache_advance
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.8
4
+ version: 1.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aubrey Holland