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

Allow arbitrary max-age parameter #292

Closed
niutech opened this issue May 30, 2021 · 3 comments
Closed

Allow arbitrary max-age parameter #292

niutech opened this issue May 30, 2021 · 3 comments
Assignees
Labels
completed Feature or request has been completed enhancement New feature or request

Comments

@niutech
Copy link

niutech commented May 30, 2021

Please allow arbitrary max-age parameter for Cache-Control header, such as 1d or 7d instead of only 31d, 62d, 93d and 186d. What's the technical problem with making it n days? Just remove this switch statement. For me, 31 days is too long.

@andrieslouw
Copy link
Member

You could remove the switch statement from the source to use it on your own server(s). It is some older implementation with two reasons: 1. CloudFlare only had specific options which worked with the max-age, but this is solved now. 2. We don't want to have shorter max-ages than 1 day, as it would be unfeasible to host the free service without any caching.

@kleisauke : Can we make it any number of days?

@andrieslouw andrieslouw added the enhancement New feature or request label Jul 4, 2021
kleisauke added a commit that referenced this issue Aug 1, 2021
To document that arbitrary values for the max-age parameter are supported.

See: #292.
@kleisauke kleisauke added the completed Feature or request has been completed label Aug 1, 2021
@kleisauke
Copy link
Member

This has been fixed with commit e7ea271, which has just been rolled out to production. Thanks for reporting this!

@niutech
Copy link
Author

niutech commented Aug 1, 2021

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
completed Feature or request has been completed enhancement New feature or request
Development

No branches or pull requests

3 participants