Module: ActionController::Caching::SqlCache

Defined in:
lib/action_controller/caching.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object

:nodoc:



670
671
672
673
674
# File 'lib/action_controller/caching.rb', line 670

def self.included(base) #:nodoc:
  if defined?(ActiveRecord) && ActiveRecord::Base.respond_to?(:cache)
    base.alias_method_chain :perform_action, :caching
  end
end

Instance Method Details

#perform_action_with_cachingObject



676
677
678
679
680
# File 'lib/action_controller/caching.rb', line 676

def perform_action_with_caching
  ActiveRecord::Base.cache do
    perform_action_without_caching
  end
end