diff options
Diffstat (limited to 'actionpack/lib/action_controller/caching.rb')
-rw-r--r-- | actionpack/lib/action_controller/caching.rb | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/actionpack/lib/action_controller/caching.rb b/actionpack/lib/action_controller/caching.rb index fc27a0774b..462f147371 100644 --- a/actionpack/lib/action_controller/caching.rb +++ b/actionpack/lib/action_controller/caching.rb @@ -2,11 +2,9 @@ require 'fileutils' require 'uri' require 'set' -module ActionController #:nodoc: +module ActionController # \Caching is a cheap way of speeding up slow applications by keeping the result of # calculations, renderings, and database calls around for subsequent requests. - # Action Controller affords you three approaches in varying levels of granularity: - # Page, Action, Fragment. # # You can read more about each approach and the sweeping assistance by clicking the # modules below. @@ -17,8 +15,7 @@ module ActionController #:nodoc: # == \Caching stores # # All the caching stores from ActiveSupport::Cache are available to be used as backends - # for Action Controller caching. This setting only affects action and fragment caching - # as page caching is always written to disk. + # for Action Controller caching. # # Configuration examples (MemoryStore is the default): # @@ -32,9 +29,7 @@ module ActionController #:nodoc: extend ActiveSupport::Autoload eager_autoload do - autoload :Actions autoload :Fragments - autoload :Pages autoload :Sweeper, 'action_controller/caching/sweeping' autoload :Sweeping, 'action_controller/caching/sweeping' end @@ -58,12 +53,25 @@ module ActionController #:nodoc: include AbstractController::Callbacks include ConfigMethods - include Pages, Actions, Fragments + include Fragments include Sweeping if defined?(ActiveRecord) included do extend ConfigMethods + config_accessor :default_static_extension + self.default_static_extension ||= '.html' + + def self.page_cache_extension=(extension) + ActiveSupport::Deprecation.deprecation_warning(:page_cache_extension, :default_static_extension) + self.default_static_extension = extension + end + + def self.page_cache_extension + ActiveSupport::Deprecation.deprecation_warning(:page_cache_extension, :default_static_extension) + default_static_extension + end + config_accessor :perform_caching self.perform_caching = true if perform_caching.nil? end |