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

Disabling client cache should be optionable #51

Open
asfaltboy opened this issue Apr 17, 2020 · 2 comments
Open

Disabling client cache should be optionable #51

asfaltboy opened this issue Apr 17, 2020 · 2 comments

Comments

@asfaltboy
Copy link
Contributor

The commit 713f918 added a decorator that sets the cache-control and expires headers to explicitly disable caching on the client.

While I can see how this may be useful in some cases, it doesn't work for my use case. I want to be able to allow a client which had an authorized user access an image, to keep accessing it for a short while after, thus I'd like to customize the cache-control's max-age and expires values to something else (perhaps something closer to what the S3 token expiry is set to).

How do you feel about allowing the header values to be customized? Or perhaps allowing users to specify the expiry time delta (in seconds?) or None (to disable cache) ? If you agree with one of these solutions, I would love to submit a pull request.

@mfxuus
Copy link

mfxuus commented Jul 24, 2020

I agree - was trying to figure out what was disabling the cache (thought I mis-configured the server) and traced it back to @add_no_cache_headers. Would be nice to have this configurable.

@xjlin0
Copy link

xjlin0 commented May 26, 2021

Totally agree -- could we at least can turn it on/off so the cache is allowed? thanks!

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

3 participants