Module: ActiveSupport::Cache::Strategy::LocalCache::LocalCacheRegistry
- Extended by:
- LocalCacheRegistry
- Included in:
- LocalCacheRegistry
- Defined in:
- lib/active_support/cache/strategy/local_cache.rb
Overview
Class for storing and registering the local caches.
Instance Method Summary collapse
Instance Method Details
#cache_for(local_cache_key) ⇒ Object
20 21 22 23 |
# File 'lib/active_support/cache/strategy/local_cache.rb', line 20 def cache_for(local_cache_key) registry = ActiveSupport::IsolatedExecutionState[:active_support_local_cache_registry] ||= {} registry[local_cache_key] end |
#set_cache_for(local_cache_key, value) ⇒ Object
25 26 27 28 |
# File 'lib/active_support/cache/strategy/local_cache.rb', line 25 def set_cache_for(local_cache_key, value) registry = ActiveSupport::IsolatedExecutionState[:active_support_local_cache_registry] ||= {} registry[local_cache_key] = value end |