Method: ActiveRecord::ConnectionAdapters::QueryCache#cache
- Defined in:
- lib/active_record/connection_adapters/abstract/query_cache.rb
#cache ⇒ Object
Enable the query cache within the block.
31 32 33 34 35 36 37 38 |
# File 'lib/active_record/connection_adapters/abstract/query_cache.rb', line 31 def cache old, @query_cache_enabled = @query_cache_enabled, true @query_cache ||= {} yield ensure clear_query_cache @query_cache_enabled = old end |