instance method
call
Ruby on Rails 3.1.12
Since v2.3.18 Last seen in v4.2.11.3Signature
call(env)
No documentation comment.
Parameters
-
envreq
Source
# File activerecord/lib/active_record/query_cache.rb, line 60
def call(env)
old = ActiveRecord::Base.connection.query_cache_enabled
ActiveRecord::Base.connection.enable_query_cache!
status, headers, body = @app.call(env)
[status, headers, BodyProxy.new(old, body, ActiveRecord::Base.connection_id)]
rescue Exception => e
ActiveRecord::Base.connection.clear_query_cache
unless old
ActiveRecord::Base.connection.disable_query_cache!
end
raise e
end
Defined in activerecord/lib/active_record/query_cache.rb line 60
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::QueryCache