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]
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