uses-long-cache is too strict
See original GitHub issueThe audit uses-long-cache
is too restrictive as it basically requires a cache set to a value larger than 96.5 days to pass.
If instead the threshold was decreased to >= 90%. Then an asset cached for a week would be ok.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Make use of long-term caching - web.dev
Use bundle versioning and cache headers #. The common approach of doing caching is to: tell the browser to cache a file for...
Read more >How to Fix the Leverage Browser Caching Warning in ... - Kinsta
1. Add Cache-Control and Expires Headers. There are two headers related to browser caching: Cache-Control and Expires. At least one must be ...
Read more >Server-side caching - Apollo GraphQL Docs
When Apollo Server resolves an operation, it calculates the result's correct cache behavior based on the most restrictive settings among the result's fields ......
Read more >Cache-Control - HTTP - MDN Web Docs
So those are hard to store in a cache with max-age . In such a case, you could address the caching needs by...
Read more >Understanding Cache: How Caching Impacts Site Speed
Think of caching as the digital equivalent of keeping copies of the files you reference most frequently on your desk, so you don't...
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
That sounds reasonable though I’m not sure what we would ask of the remaining assets. Our thinking was "hey if this thing actually changes, you probably want to keep it up to a year but throw
must-revalidate
on there or something instead."The best retort I think we’ve heard so far to that was “we would ideally wantmust-revalidate
but we’re OK with very slightly stale responses without a revalidation to save requests so we use 4 hours instead” The problem is there’s no real way for us to differentiate that case from the case of poorly chosen cache lifetimes. Hence, why I’m back to narrowing the scope of the audit instead.Yeah docs should be updated either way no matter what we do here.