instance method
use_temporary_local_cache
Ruby on Rails 8.1.2
Since v4.0.13 PrivateSignature
use_temporary_local_cache(temporary_cache)
No documentation comment.
Parameters
-
temporary_cachereq
Source
# File activesupport/lib/active_support/cache/strategy/local_cache.rb, line 234
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
Defined in activesupport/lib/active_support/cache/strategy/local_cache.rb line 234
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::Cache::Strategy::LocalCache