Class ActionController::Caching::Actions::ActionCachePath
In: vendor/rails/actionpack/lib/action_controller/caching/actions.rb
Parent: Object

Methods

new   path_for  

Attributes

extension  [R] 
path  [R] 

Public Class methods

When true, infer_extension will look up the cache path extension 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.

[Source]

     # File vendor/rails/actionpack/lib/action_controller/caching/actions.rb, line 139
139:         def initialize(controller, options = {}, infer_extension=true)
140:           if infer_extension and options.is_a? Hash
141:             request_extension = extract_extension(controller.request)
142:             options = options.reverse_merge(:format => request_extension)
143:           end
144:           path = controller.url_for(options).split('://').last
145:           normalize!(path)
146:           if infer_extension
147:             @extension = request_extension
148:             add_extension!(path, @extension)
149:           end
150:           @path = URI.unescape(path)
151:         end

[Source]

     # File vendor/rails/actionpack/lib/action_controller/caching/actions.rb, line 132
132:           def path_for(controller, options, infer_extension=true)
133:             new(controller, options, infer_extension).path
134:           end

[Validate]