class method
self.dirties_query_cache
Ruby on Rails 8.1.2
Since v2.2.3Signature
self.dirties_query_cache(base, *method_names)
No documentation comment.
Parameters
-
basereq -
method_namesrest
Source
# File activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb, line 18
def dirties_query_cache(base, *method_names)
method_names.each do |method_name|
base.class_eval <<-end_code, __FILE__, __LINE__ + 1
def #{method_name}(...)
if pool.dirties_query_cache
ActiveRecord::Base.clear_query_caches_for_current_thread
end
super
end
end_code
end
end
Defined in activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb line 18
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::QueryCache