Parent

Methods

Files

Class Index [+]

Quicksearch

ActiveRecord::QueryCache

Active Record Query Cache

Public Class Methods

new(app) click to toggle source
    # File lib/active_record/query_cache.rb, line 26
26:     def initialize(app)
27:       @app = app
28:     end

Public Instance Methods

call(env) click to toggle source
    # File lib/active_record/query_cache.rb, line 60
60:     def call(env)
61:       old = ActiveRecord::Base.connection.query_cache_enabled
62:       ActiveRecord::Base.connection.enable_query_cache!
63: 
64:       status, headers, body = @app.call(env)
65:       [status, headers, BodyProxy.new(old, body, ActiveRecord::Base.connection_id)]
66:     rescue Exception => e
67:       ActiveRecord::Base.connection.clear_query_cache
68:       unless old
69:         ActiveRecord::Base.connection.disable_query_cache!
70:       end
71:       raise e
72:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.