Module ActiveRecord::QueryCache
In: vendor/rails/activerecord/lib/active_record/query_cache.rb

Methods

cache   uncached  

Public Instance methods

Enable the query cache within the block if Active Record is configured.

[Source]

    # File vendor/rails/activerecord/lib/active_record/query_cache.rb, line 4
 4:     def cache(&block)
 5:       if ActiveRecord::Base.configurations.blank?
 6:         yield
 7:       else
 8:         connection.cache(&block)
 9:       end
10:     end

Disable the query cache within the block if Active Record is configured.

[Source]

    # File vendor/rails/activerecord/lib/active_record/query_cache.rb, line 13
13:     def uncached(&block)
14:       if ActiveRecord::Base.configurations.blank?
15:         yield
16:       else
17:         connection.uncached(&block)
18:       end
19:     end

[Validate]