Methods
Attributes
[R] | extension | |
[R] | path |
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.
[ show source ]
# File actionpack/lib/action_controller/caching/actions.rb, line 148 148: def initialize(controller, options = {}, infer_extension = true) 149: if infer_extension 150: extract_extension(controller.request) 151: options = options.reverse_merge(:format => @extension) if options.is_a?(Hash) 152: end 153: 154: path = controller.url_for(options).split('://').last 155: normalize!(path) 156: add_extension!(path, @extension) 157: @path = URI.unescape(path) 158: end
[ show source ]
# File actionpack/lib/action_controller/caching/actions.rb, line 140 140: def path_for(controller, options, infer_extension = true) 141: new(controller, options, infer_extension).path 142: end