Froze rails gems
[depot.git] / vendor / rails / activerecord / lib / active_record / query_cache.rb
1 module ActiveRecord
2 module QueryCache
3 # Enable the query cache within the block if Active Record is configured.
4 def cache(&block)
5 if ActiveRecord::Base.configurations.blank?
6 yield
7 else
8 connection.cache(&block)
9 end
10 end
11
12 # Disable the query cache within the block if Active Record is configured.
13 def uncached(&block)
14 if ActiveRecord::Base.configurations.blank?
15 yield
16 else
17 connection.uncached(&block)
18 end
19 end
20 end
21 end