Methods
C
U
Instance Public methods
cache(&block)

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

    # File activerecord/lib/active_record/query_cache.rb, line 8
 8:       def cache(&block)
 9:         if ActiveRecord::Base.configurations.blank?
10:           yield
11:         else
12:           connection.cache(&block)
13:         end
14:       end
uncached(&block)

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

    # File activerecord/lib/active_record/query_cache.rb, line 17
17:       def uncached(&block)
18:         if ActiveRecord::Base.configurations.blank?
19:           yield
20:         else
21:           connection.uncached(&block)
22:         end
23:       end