aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorSebastian Martinez <sebastian@wyeworks.com>2011-04-22 12:53:02 -0300
committerSebastian Martinez <sebastian@wyeworks.com>2011-04-22 12:53:02 -0300
commit0e2644cde043f1d7126fda0510d9961eb1692403 (patch)
tree207b885eac81d14fd60a984517ae96b0e1c24908 /activerecord
parente2656e07b9f9482f19f53054b72167b1bca2e6b7 (diff)
downloadrails-0e2644cde043f1d7126fda0510d9961eb1692403.tar.gz
rails-0e2644cde043f1d7126fda0510d9961eb1692403.tar.bz2
rails-0e2644cde043f1d7126fda0510d9961eb1692403.zip
Added missing docs for clear_cache! on adapters
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/connection_adapters/mysql_adapter.rb1
-rw-r--r--activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb1
-rw-r--r--activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb1
3 files changed, 3 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
index e01419224b..3318075e9e 100644
--- a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
@@ -332,6 +332,7 @@ module ActiveRecord
rows
end
+ # Clear prepared statement cache.
def clear_cache!
@statements.values.each do |cache|
cache[:stmt].close
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
index 94cf8d45d6..ba7852192e 100644
--- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -237,6 +237,7 @@ module ActiveRecord
@local_tz = execute('SHOW TIME ZONE', 'SCHEMA').first["TimeZone"]
end
+ # Clear prepared statement cache.
def clear_cache!
@statements.each_value do |value|
@connection.query "DEALLOCATE #{value}"
diff --git a/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb b/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
index 5d2ebff9a7..326f22ce82 100644
--- a/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
@@ -96,6 +96,7 @@ module ActiveRecord
@connection.close rescue nil
end
+ # Clear prepared statement cache.
def clear_cache!
@statements.clear
end