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 and 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 166
166:         def initialize(controller, options = {}, infer_extension = true)
167:           if infer_extension
168:             @extension = controller.params[:format]
169:             options.reverse_merge!(:format => @extension) if options.is_a?(Hash)
170:           end
171: 
172:           path = controller.url_for(options).split(%{://}).last
173:           @path = normalize!(path)
174:         end

Private Instance Methods

normalize!(path) click to toggle source
     # File lib/action_controller/caching/actions.rb, line 177
177:         def normalize!(path)
178:           path << 'index' if path[1] == //
179:           path << ".#{extension}" if extension and !path.split('?').first.ends_with?(".#{extension}")
180:           URI.parser.unescape(path)
181:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.