Methods
Public Instance methods
Enable the query cache within the block if Active Record is configured.
[ show source ]
# File activerecord/lib/active_record/query_cache.rb, line 5 5: def cache(&block) 6: if ActiveRecord::Base.configurations.blank? 7: yield 8: else 9: connection.cache(&block) 10: end 11: end
Disable the query cache within the block if Active Record is configured.
[ show source ]
# File activerecord/lib/active_record/query_cache.rb, line 14 14: def uncached(&block) 15: if ActiveRecord::Base.configurations.blank? 16: yield 17: else 18: connection.uncached(&block) 19: end 20: end