diff --git a/actionpack/lib/action_controller/caching.rb b/actionpack/lib/action_controller/caching.rb index 53ec03a7a4fb221c211894348b24d89c306b8fc0..28c702e60f1472402dbd138738459a1de5e9b725 100644 --- a/actionpack/lib/action_controller/caching.rb +++ b/actionpack/lib/action_controller/caching.rb @@ -180,16 +180,11 @@ def expire_action(options = {}) class ActionCacheFilter #:nodoc: def initialize(*actions) @actions = actions - @action_urls = {} - end - - def action_url(controller) - @action_urls[controller.action_name] ||= controller.url_for.split("://").last end def before(controller) return unless @actions.include?(controller.action_name.intern) - if cache = controller.read_fragment(action_url(controller)) + if cache = controller.read_fragment(controller.url_for.split("://").last) controller.rendered_action_cache = true controller.send(:render_text, cache) false @@ -198,7 +193,7 @@ def before(controller) def after(controller) return if !@actions.include?(controller.action_name.intern) || controller.rendered_action_cache - controller.write_fragment(action_url(controller), controller.response.body) + controller.write_fragment(controller.url_for.split("://").last, controller.response.body) end end end