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

Respect ttl from the cache-headers #77

Closed
igorescobar opened this issue May 20, 2020 · 4 comments
Closed

Respect ttl from the cache-headers #77

igorescobar opened this issue May 20, 2020 · 4 comments

Comments

@igorescobar
Copy link

Current behavior

Nuster ignores the information ta comes from the backend regarding for how long should Nuster cache the file. It means that if your backend already takes care of setting correctly the Cache-Control header you might have to duplicate all your cache definitions in both places since this header is highly adopted if you have a CDN on top of your service or even for local caching on the user browser.

Expected Behaviour

Currently, the only way we have to tell how for how long Nuster should cache our files is by using the ttl=<time>.

In my humble opinion, the default should be to respect what is defined on the HTTP protocol (honoring the headers) and gives us the option to tell otherwise as Nginx does. But I guess this might be a harder decision to make. So in that case, it would be nice if ttl accepted an option like ttl=auto or similar. Where ttl=auto means it will use that's defined on the backend response.

Thanks a lot and keep it up with the good work! 🏆

@jiangwenyuan
Copy link
Owner

jiangwenyuan commented Jun 4, 2020

Added, only s-maxage and max-age, TODO: Expires

@igorescobar
Copy link
Author

Nice!

@igorescobar
Copy link
Author

When will it be available via Docker?

@jiangwenyuan
Copy link
Owner

The latest image is building on Dockerhub. Note that it's based on master branch.

jiangwenyuan added a commit that referenced this issue Jun 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants