Displaying 1 result from an estimated 1 matches for "path_fingerprint".
2012 Dec 18
2
cache-busting non-digest assets in sprockets in development a good idea? should headers in sprockets be configurable?
...rver
private
alias_method :sprockets_headers, :headers
def headers(env, asset, length)
sprockets_headers(env, asset, length).tap do |headers|
# cache-bust .html assets because in our case they are frequently
AngularJS templates we need to tweak
if !path_fingerprint(env["PATH_INFO"]) &&
asset.pathname.basename.to_s[''.html'']
headers["Cache-Control"] = "max-age=0, private, must-revalidate"
end
end
end
end
end
end
Would the ability to configure "Cache-Control&...