Parent

Methods

Class Index [+]

Quicksearch

ActionController::Caching::Actions::ActionCachePath

Attributes

path[R]
extension[R]

Public Class Methods

new(controller, options = {}, infer_extension = true) click to toggle source

If infer_extension is true, the cache path extension is looked up from the request’s path & format. This is desirable when reading and writing the cache, but not when expiring the cache - expire_action should expire the same files regardless of the request format.

     # File lib/action_controller/caching/actions.rb, line 150
150:         def initialize(controller, options = {}, infer_extension = true)
151:           if infer_extension
152:             @extension = controller.params[:format]
153:             options.reverse_merge!(:format => @extension) if options.is_a?(Hash)
154:           end
155: 
156:           path = controller.url_for(options).split(%{://}).last
157:           @path = normalize!(path)
158:         end

Private Instance Methods

normalize!(path) click to toggle source
     # File lib/action_controller/caching/actions.rb, line 161
161:         def normalize!(path)
162:           path << 'index' if path[1] == //
163:           path << ".#{extension}" if extension and !path.ends_with?(extension)
164:           URI.unescape(path)
165:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.