22require 'uri'
33require 'set'
44
5- module ActionController #:nodoc:
5+ module ActionController
66 # \Caching is a cheap way of speeding up slow applications by keeping the result of
77 # calculations, renderings, and database calls around for subsequent requests.
8- # Action Controller affords you three approaches in varying levels of granularity:
9- # Page, Action, Fragment.
108 #
119 # You can read more about each approach and the sweeping assistance by clicking the
1210 # modules below.
@@ -17,8 +15,7 @@ module ActionController #:nodoc:
1715 # == \Caching stores
1816 #
1917 # All the caching stores from ActiveSupport::Cache are available to be used as backends
20- # for Action Controller caching. This setting only affects action and fragment caching
21- # as page caching is always written to disk.
18+ # for Action Controller caching.
2219 #
2320 # Configuration examples (MemoryStore is the default):
2421 #
@@ -32,9 +29,7 @@ module Caching
3229 extend ActiveSupport ::Autoload
3330
3431 eager_autoload do
35- autoload :Actions
3632 autoload :Fragments
37- autoload :Pages
3833 autoload :Sweeper , 'action_controller/caching/sweeping'
3934 autoload :Sweeping , 'action_controller/caching/sweeping'
4035 end
@@ -58,12 +53,25 @@ def cache_configured?
5853 include AbstractController ::Callbacks
5954
6055 include ConfigMethods
61- include Pages , Actions , Fragments
56+ include Fragments
6257 include Sweeping if defined? ( ActiveRecord )
6358
6459 included do
6560 extend ConfigMethods
6661
62+ config_accessor :default_static_extension
63+ self . default_static_extension ||= '.html'
64+
65+ def self . page_cache_extension = ( extension )
66+ ActiveSupport ::Deprecation . deprecation_warning ( :page_cache_extension , :default_static_extension )
67+ self . default_static_extension = extension
68+ end
69+
70+ def self . page_cache_extension
71+ ActiveSupport ::Deprecation . deprecation_warning ( :page_cache_extension , :default_static_extension )
72+ default_static_extension
73+ end
74+
6775 config_accessor :perform_caching
6876 self . perform_caching = true if perform_caching . nil?
6977 end
0 commit comments