Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to MD5-based cache buster in filename #18

Open
rondevera opened this issue Aug 8, 2011 · 3 comments
Open

Switch to MD5-based cache buster in filename #18

rondevera opened this issue Aug 8, 2011 · 3 comments
Milestone

Comments

@rondevera
Copy link
Collaborator

Currently, cache busting is managed by adding a bundle's latest Git SHA to the query string. Two problems:

  • Some CDNs fail to recognize cache busters in query strings.
  • This assumes that Git is being used for version control.

Change from application.min.css?a1b2c3 to application-a1b2c3.min.css (like in Rails 3.1), and drop Git SHAs in favor of MD5 fingerprints.

@ghost ghost assigned rondevera Aug 8, 2011
@bob-p
Copy link
Member

bob-p commented Aug 9, 2011

Is the plan to actually write the images out like this? If so did you think about just writing out the file paths with a cache buster and using nginx to rewrite?

@rondevera
Copy link
Collaborator Author

Yeah, the plan is to actually change the filenames. This is consistent with how Rails 3.1 handles the problem, and saves the developer from the hassle of configuring the web server (which isn't necessarily nginx).

@ghost ghost assigned edds Aug 10, 2011
@dwo
Copy link

dwo commented Nov 1, 2011

+1 to this notion. I reckon not taking Git for granted is the right way to go here.

Our team has battled back and forth with several approaches and the query string tactic just hasn't been very reliable with our CDN.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants