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

Fix #489 - Add $realpath_root to fastcgi_cache_key #542

Merged
merged 1 commit into from
Apr 2, 2016

Conversation

swalkinshaw
Copy link
Member

This acts as an automatic cache buster when a deploy happens.
$realpath_root contains the real/un-symlinked path to the web root.

Example: /srv/www/example.com/releases/20160101 instead of
/srv/www/example.com/current

This will prevent some known bugs where a cached page refers to a now
non-existent "revved" asset like Sage generates (a CSS or JS file with a
hash in the filename).

@swalkinshaw
Copy link
Member Author

In #489 @retlehs had said that adding $realpath_root didn't work. However in my tests, adding it to the cache key correctly resulted in a cache miss on the next request.

This acts as an automatic cache buster when a deploy happens.
`$realpath_root` contains the real/un-symlinked path to the web root.

Example: `/srv/www/example.com/releases/20160101` instead of
`/srv/www/example.com/current`

This will prevent some known bugs where a cached page refers to a now
non-existent "revved" asset like Sage generates (a CSS or JS file with a
hash in the filename).
@swalkinshaw swalkinshaw merged commit 6050399 into master Apr 2, 2016
@swalkinshaw swalkinshaw deleted the improve-nginx-cache-key branch April 2, 2016 18:48
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

Successfully merging this pull request may close these issues.

1 participant