aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/query_cache.rb
diff options
context:
space:
mode:
authorVijay Dev <vijaydev.cse@gmail.com>2012-12-04 22:26:16 +0530
committerVijay Dev <vijaydev.cse@gmail.com>2012-12-04 22:26:16 +0530
commit40e16121c05f10f9b75b6cd68c32092876142861 (patch)
treeef029336773e706cad2442d232a184ff0db38efe /activerecord/lib/active_record/query_cache.rb
parent9d3ce6c7d24fb8fe63f4bde4718e6af6225e5a98 (diff)
parent2b847a0a9b56c7ede40012c7b3bd8ec90d6c111c (diff)
downloadrails-40e16121c05f10f9b75b6cd68c32092876142861.tar.gz
rails-40e16121c05f10f9b75b6cd68c32092876142861.tar.bz2
rails-40e16121c05f10f9b75b6cd68c32092876142861.zip
Merge branch 'master' of github.com:lifo/docrails
Conflicts: guides/source/migrations.md
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..df8654e5c1 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 will 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 will execute the given block.
def uncached(&block)
if ActiveRecord::Base.connected?
connection.uncached(&block)