Module: Switchman::ActionController::Caching::ConfigMethods
- Included in:
- Switchman::ActionController::Caching
- Defined in:
- lib/switchman/action_controller/caching.rb
Instance Method Summary collapse
-
#cache_store ⇒ Object
always go through Rails.cache, which will give you the cache store appropriate to the current shard.
-
#cache_store=(cache) ⇒ Object
disallow assigning to ActionController::Base.cache_store or ActionController::Base#cache_store for the same reasons we disallow assigning to Rails.cache.
Instance Method Details
#cache_store ⇒ Object
always go through Rails.cache, which will give you the cache store appropriate to the current shard.
9 10 11 |
# File 'lib/switchman/action_controller/caching.rb', line 9 def cache_store ::Rails.cache end |
#cache_store=(cache) ⇒ Object
disallow assigning to ActionController::Base.cache_store or ActionController::Base#cache_store for the same reasons we disallow assigning to Rails.cache
16 17 18 |
# File 'lib/switchman/action_controller/caching.rb', line 16 def cache_store=(cache) raise NoMethodError unless cache == ::Rails.cache end |