class method
self.dirties_query_cache
Ruby on Rails 6.0.6
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 17
def dirties_query_cache(base, *method_names)
method_names.each do |method_name|
base.class_eval <<-end_code, __FILE__, __LINE__ + 1
def #{method_name}(*)
ActiveRecord::Base.clear_query_caches_for_current_thread if @query_cache_enabled
super
end
end_code
end
end
Defined in activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb line 17
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::QueryCache