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

Merge pull request #41046 from eileencodes/dont-check-if-qc-is-enabled

Don't check if QC is enabled
This commit is contained in:
Eileen M. Uchitelle 2021-01-08 08:11:52 -05:00 committed by GitHub
commit c97f1f195f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -30,10 +30,10 @@ module ActiveRecord
if ActiveRecord::Base.legacy_connection_handling if ActiveRecord::Base.legacy_connection_handling
ActiveRecord::Base.connection_handlers.each do |key, handler| ActiveRecord::Base.connection_handlers.each do |key, handler|
pools.concat(handler.connection_pool_list.reject { |p| p.query_cache_enabled }.each { |p| p.enable_query_cache! }) pools.concat(handler.connection_pool_list.each { |p| p.enable_query_cache! })
end end
else else
pools.concat(ActiveRecord::Base.connection_handler.all_connection_pools.reject { |p| p.query_cache_enabled }.each { |p| p.enable_query_cache! }) pools.concat(ActiveRecord::Base.connection_handler.all_connection_pools.each { |p| p.enable_query_cache! })
end end
pools pools