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

Cache-control header for symlinked assets is far out #7

Open
dylanjha opened this issue Jul 5, 2018 · 1 comment
Open

Cache-control header for symlinked assets is far out #7

dylanjha opened this issue Jul 5, 2018 · 1 comment

Comments

@dylanjha
Copy link

dylanjha commented Jul 5, 2018

For symlinked assets the cache control header is:

cache-control: public, max-age=14400

This is the same header used for the non-symlinked asset.

I'm sure this is the intended behavior, but I can imagine that for some use cases you would want the symlinked assed to have a shorter cache expiration so that if the source JS file is changed, clients will download the new code.

Following the example in the README, if you distribute a "widget.js" asset to clients, and then push a bugfix to widget.js, CDNs & browser that already have the old asset cached will not download the code that has the bugfix.

Is there any known way around this? I can't seem to find a way to change the cache-control header for only "symlinked assets".

@fcheung
Copy link
Owner

fcheung commented Jul 6, 2018

what is setting the header? The way I serve my assets (via apache) I have rules setting the expiry time of things in assets/ and as you say it’s usually a good thing to use a lower expiry time for these than for files with digests in their name

I don’t think there is anything this gem is doing that has any impact on what caching headers are being set (but I would love to be proven wrong)

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

2 participants