method
use_temporary_local_cache
v4.2.7 -
Show latest stable
- Class:
ActiveSupport::Cache::Strategy::LocalCache
use_temporary_local_cache(temporary_cache)private
No documentation available.
# File activesupport/lib/active_support/cache/strategy/local_cache.rb, line 149
def use_temporary_local_cache(temporary_cache)
save_cache = LocalCacheRegistry.cache_for(local_cache_key)
begin
LocalCacheRegistry.set_cache_for(local_cache_key, temporary_cache)
yield
ensure
LocalCacheRegistry.set_cache_for(local_cache_key, save_cache)
end
end