1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Added missing docs for clear_cache! on adapters

This commit is contained in:
Sebastian Martinez 2011-04-22 12:53:02 -03:00
parent e2656e07b9
commit 0e2644cde0
3 changed files with 3 additions and 0 deletions

View file

@ -332,6 +332,7 @@ module ActiveRecord
rows
end
# Clear prepared statement cache.
def clear_cache!
@statements.values.each do |cache|
cache[:stmt].close

View file

@ -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}"

View file

@ -96,6 +96,7 @@ module ActiveRecord
@connection.close rescue nil
end
# Clear prepared statement cache.
def clear_cache!
@statements.clear
end