Sha256: 2aeeebd9e607179cc25ce2609c911f5ab3773fa64ff53ee9c8a17532a34e108f
Contents?: true
Size: 510 Bytes
Versions: 51
Compression:
Stored size: 510 Bytes
Contents
module ActiveRecord module QueryCache # Enable the query cache within the block if Active Record is configured. def cache(&block) if ActiveRecord::Base.configurations.blank? yield else connection.cache(&block) end end # Disable the query cache within the block if Active Record is configured. def uncached(&block) if ActiveRecord::Base.configurations.blank? yield else connection.uncached(&block) end end end end
Version data entries
51 entries across 50 versions & 13 rubygems