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