[Feature Request] Support custom cache control
See original GitHub issueIs your feature request related to a problem? Please describe.
Talking about rate limiter, it is better to have a customizable cache-control
. E.g. I will use longer cache-control for repo card (extra pin). It is also helpful for people trying to avoid rate limiting.
Describe the solution you’d like
Add a parameter &cache_control=<maxage>
. But the minimum maxage
should retain 1800
to avoid abusement.
Additional context
Shields.IO has parameter ?cacheSeconds=
support, and they are using 3600s
as default cache-control.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:11 (11 by maintainers)
Top Results From Across the Web
Custom Caching Strategies - CacheControl - Read the Docs
A cache heuristic allows specifying a caching strategy by adjusting response headers before the response is considered for caching. For example, if we...
Read more >Feature request: custom cache-control headers #567 - GitHub
Q: Why set a Cache-Control header at all for page requests – aren't they largely dynamic by nature (I'd be using sapper export...
Read more >Cache-Control - HTTP - MDN Web Docs
The Cache-Control HTTP header field holds directives (instructions) — in both requests and responses — that control caching in browsers and ...
Read more >What is Cache-Control and How HTTP Cache Headers Work
Cache -control is an HTTP header used to specify browser caching policies in both client requests and server responses. Policies include how a...
Read more >Allow full cache control via HTTP headers
A simple change would be a custom HTTP header, which would tell Cloudflare how to cache this particular page. For example, it could...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I like @filiptronicek’s suggestion to make the cache longer if the repo card has over 1k stars
I like that idea @filiptronicek, Sound really reasonable. There is no need to update if the value it’s truncated