Module: Switchman::ActionController::Caching::ConfigMethods

Included in:
Switchman::ActionController::Caching
Defined in:
lib/switchman/action_controller/caching.rb

Instance Method Summary collapse

Instance Method Details

#cache_storeObject

always go through Rails.cache, which will give you the cache store appropriate to the current shard.



7
8
9
# File 'lib/switchman/action_controller/caching.rb', line 7

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

Raises:

  • (NoMethodError)


14
15
16
# File 'lib/switchman/action_controller/caching.rb', line 14

def cache_store=(cache)
  raise NoMethodError
end