Module: ActiveRecord::ConnectionAdapters::QueryCache::ConnectionPoolConfiguration
- Included in:
 - ConnectionPool
 
- Defined in:
 - lib/active_record/connection_adapters/abstract/query_cache.rb
 
Instance Method Summary collapse
- #disable_query_cache! ⇒ Object
 - #enable_query_cache! ⇒ Object
 - #initialize ⇒ Object
 - #query_cache_enabled ⇒ Object
 
Instance Method Details
#disable_query_cache! ⇒ Object
      40 41 42 43  | 
    
      # File 'lib/active_record/connection_adapters/abstract/query_cache.rb', line 40 def disable_query_cache! @query_cache_enabled.delete connection_cache_key(current_thread) connection.disable_query_cache! if active_connection? end  | 
  
#enable_query_cache! ⇒ Object
      35 36 37 38  | 
    
      # File 'lib/active_record/connection_adapters/abstract/query_cache.rb', line 35 def enable_query_cache! @query_cache_enabled[connection_cache_key(current_thread)] = true connection.enable_query_cache! if active_connection? end  | 
  
#initialize ⇒ Object
      30 31 32 33  | 
    
      # File 'lib/active_record/connection_adapters/abstract/query_cache.rb', line 30 def initialize(*) super @query_cache_enabled = Concurrent::Map.new { false } end  | 
  
#query_cache_enabled ⇒ Object
      45 46 47  | 
    
      # File 'lib/active_record/connection_adapters/abstract/query_cache.rb', line 45 def query_cache_enabled @query_cache_enabled[connection_cache_key(current_thread)] end  |