aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/query_cache.rb
diff options
context:
space:
mode:
authorAlvaro Pereyra <alvaro@xendacentral.com>2012-12-01 15:35:04 -0500
committerAlvaro Pereyra <alvaro@xendacentral.com>2012-12-01 15:35:04 -0500
commitb1e2d7b96842f5b8b2a8fe911a6d31626c01effc (patch)
tree2918f4fd8df44985e4d3df922d32b4cb86267d13 /activerecord/lib/active_record/query_cache.rb
parent4940d6d096a581d46addecd9b41bbd62af3e1888 (diff)
downloadrails-b1e2d7b96842f5b8b2a8fe911a6d31626c01effc.tar.gz
rails-b1e2d7b96842f5b8b2a8fe911a6d31626c01effc.tar.bz2
rails-b1e2d7b96842f5b8b2a8fe911a6d31626c01effc.zip
Cleans and removes 'Examples' tag [ci skip]
Diffstat (limited to 'activerecord/lib/active_record/query_cache.rb')
-rw-r--r--activerecord/lib/active_record/query_cache.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/query_cache.rb b/activerecord/lib/active_record/query_cache.rb
index 38e18b32a4..2cf75bcfc4 100644
--- a/activerecord/lib/active_record/query_cache.rb
+++ b/activerecord/lib/active_record/query_cache.rb
@@ -4,6 +4,7 @@ module ActiveRecord
class QueryCache
module ClassMethods
# Enable the query cache within the block if Active Record is configured.
+ # If it's not, it willl execute the given block.
def cache(&block)
if ActiveRecord::Base.connected?
connection.cache(&block)
@@ -13,6 +14,7 @@ module ActiveRecord
end
# Disable the query cache within the block if Active Record is configured.
+ # If it's not, it willl execute the given block.
def uncached(&block)
if ActiveRecord::Base.connected?
connection.uncached(&block)