diff options
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_controller/caching.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_controller/caching/pages.rb | 10 | ||||
-rw-r--r-- | actionpack/lib/action_view/helpers/cache_helper.rb | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/actionpack/lib/action_controller/caching.rb b/actionpack/lib/action_controller/caching.rb index b3fa129929..3489d94ec9 100644 --- a/actionpack/lib/action_controller/caching.rb +++ b/actionpack/lib/action_controller/caching.rb @@ -52,7 +52,7 @@ module ActionController #:nodoc: private def cache_configured? - perform_caching && cache_store + config.perform_caching && cache_store end end diff --git a/actionpack/lib/action_controller/caching/pages.rb b/actionpack/lib/action_controller/caching/pages.rb index 21a424e6f0..801b9918c1 100644 --- a/actionpack/lib/action_controller/caching/pages.rb +++ b/actionpack/lib/action_controller/caching/pages.rb @@ -61,7 +61,7 @@ module ActionController #:nodoc: # Expires the page that was cached with the +path+ as a key. Example: # expire_page "/lists/show" def expire_page(path) - return unless perform_caching + return unless config.perform_caching path = page_cache_path(path) instrument_page_cache :expire_page, path do @@ -72,7 +72,7 @@ module ActionController #:nodoc: # Manually cache the +content+ in the key determined by +path+. Example: # cache_page "I'm the cached content", "/lists/show" def cache_page(content, path) - return unless perform_caching + return unless config.perform_caching path = page_cache_path(path) instrument_page_cache :write_page, path do @@ -92,7 +92,7 @@ module ActionController #:nodoc: # # cache the index action except for JSON requests # caches_page :index, :if => Proc.new { |c| !c.request.format.json? } def caches_page(*actions) - return unless perform_caching + return unless config.perform_caching options = actions.extract_options! after_filter({:only => actions}.merge(options)) { |c| c.cache_page } end @@ -116,7 +116,7 @@ module ActionController #:nodoc: # Expires the page that was cached with the +options+ as a key. Example: # expire_page :controller => "lists", :action => "show" def expire_page(options = {}) - return unless perform_caching + return unless config.perform_caching if options.is_a?(Hash) if options[:action].is_a?(Array) @@ -135,7 +135,7 @@ module ActionController #:nodoc: # If no options are provided, the requested url is used. Example: # cache_page "I'm the cached content", :controller => "lists", :action => "show" def cache_page(content = nil, options = nil) - return unless perform_caching && caching_allowed + return unless config.perform_caching && caching_allowed path = case options when Hash diff --git a/actionpack/lib/action_view/helpers/cache_helper.rb b/actionpack/lib/action_view/helpers/cache_helper.rb index a904af56bb..98ac43c33a 100644 --- a/actionpack/lib/action_view/helpers/cache_helper.rb +++ b/actionpack/lib/action_view/helpers/cache_helper.rb @@ -39,7 +39,7 @@ module ActionView private # TODO: Create an object that has caching read/write on it def fragment_for(name = {}, options = nil, &block) #:nodoc: - if controller.perform_caching + if controller.config.perform_caching if controller.fragment_exist?(name, options) controller.read_fragment(name, options) else |