方法
類別公開方法
new(*) 連結
來源: 顯示 | 在 GitHub 上
# File activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb, line 33 def initialize(*) super @query_cache_enabled = Concurrent::Map.new { false } end
執行個體公開方法
disable_query_cache!() 連結
來源: 顯示 | 在 GitHub 上
# File activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb, line 43 def disable_query_cache! @query_cache_enabled.delete connection_cache_key(current_thread) connection.disable_query_cache! if active_connection? end
enable_query_cache!() 連結
來源: 顯示 | 在 GitHub 上
# File activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb, line 38 def enable_query_cache! @query_cache_enabled[connection_cache_key(current_thread)] = true connection.enable_query_cache! if active_connection? end
query_cache_enabled() 連結
來源: 顯示 | 在 GitHub 上
# File activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb, line 48 def query_cache_enabled @query_cache_enabled[connection_cache_key(current_thread)] end