Sha256: b0984c5cf2c2dc09bb027811d2b76f23eb09027d8778b53a1c086f287f83d2a7

Contents?: true

Size: 448 Bytes

Versions: 15

Compression:

Stored size: 448 Bytes

Contents

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

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

Version data entries

15 entries across 14 versions & 6 rubygems

Version Path
radiant-0.7.2 vendor/rails/actionpack/lib/action_controller/caching/sql_cache.rb
vibes-bj-1.2.2 spec/rails_root/vendor/rails/actionpack/lib/action_controller/caching/sql_cache.rb
vibes-bj-1.2.1 spec/rails_root/vendor/rails/actionpack/lib/action_controller/caching/sql_cache.rb
usher-0.7.0 spec/rails2_2/vendor/rails/vendor/rails/actionpack/pkg/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb
usher-0.7.0 spec/rails2_2/vendor/rails/vendor/rails/actionpack/lib/action_controller/caching/sql_cache.rb
actionpack-2.2.3 lib/action_controller/caching/sql_cache.rb
actionpack-2.1.0 lib/action_controller/caching/sql_cache.rb
actionpack-2.2.2 lib/action_controller/caching/sql_cache.rb
actionpack-2.1.2 lib/action_controller/caching/sql_cache.rb
actionpack-2.1.1 lib/action_controller/caching/sql_cache.rb
antfarm-0.3.0 rails/vendor/rails/actionpack/lib/action_controller/caching/sql_cache.rb
antfarm-0.4.0 rails/vendor/rails/actionpack/lib/action_controller/caching/sql_cache.rb
eactionpack-2.1.2 lib/action_controller/caching/sql_cache.rb
radiant-0.7.0 vendor/rails/actionpack/lib/action_controller/caching/sql_cache.rb
radiant-0.7.1 vendor/rails/actionpack/lib/action_controller/caching/sql_cache.rb