method
clear_cache!
clear_cache!(cache, thread_id = nil, &block)
private
Hide source
# File activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb, line 127 def clear_cache!(cache, thread_id = nil, &block) if cache if @@allow_concurrency thread_id ||= Thread.current.object_id thread_cache, cache = cache, cache[thread_id] return unless cache end cache.each(&block) if block_given? cache.clear end ensure if thread_cache && @@allow_concurrency thread_cache.delete(thread_id) end end