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

clear cache for all connections when resetting

This commit is contained in:
Aaron Patterson 2011-02-11 16:26:48 -08:00
parent e0802fa176
commit 61fc309479

View file

@ -456,13 +456,12 @@ class Fixtures
table_name.to_s.camelize
end
def self.reset_cache(connection = nil)
connection ||= ActiveRecord::Base.connection
@@all_cached_fixtures.delete connection.object_id
def self.reset_cache
@@all_cached_fixtures.clear
end
def self.cache_for_connection(connection)
@@all_cached_fixtures[connection.object_id]
@@all_cached_fixtures[connection]
end
def self.fixture_is_cached?(connection, table_name)