Active Record Query Cache
Namespace
Methods
Class Public methods
complete(state)
Link
# File activerecord/lib/active_record/query_cache.rb, line 35 def self.complete(state) enabled, connection_id = state ActiveRecord::Base.connection_id = connection_id ActiveRecord::Base.connection.clear_query_cache ActiveRecord::Base.connection.disable_query_cache! unless enabled end
install_executor_hooks(executor = ActiveSupport::Executor)
Link
# File activerecord/lib/active_record/query_cache.rb, line 43 def self.install_executor_hooks(executor = ActiveSupport::Executor) executor.register_hook(self) executor.to_complete do unless ActiveRecord::Base.connection.transaction_open? ActiveRecord::Base.clear_active_connections! end end end
run()
Link