Methods
N
Attributes
[R] path
[R] extension
Class Public methods
new(controller, options = {}, infer_extension = true)

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 actionpack/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(%r{://}).last
173:           @path = normalize!(path)
174:         end