How to invalidate (bust) cache
See original GitHub issueI started a small SPA with preact-cli
using the simple template. I’ve hosted it on Netlify, auto-building from GitHub. It’s working fine but every time I update it I have to clear the cache before seeing the changes.
I’m using preact-cli 2.1.0
and here’s my repo: https://github.com/haggen/localthreat
My users are complaining they don’t see it at all even after a page reload.
I’m new to (P)React so I might be missing something here. What can I do invalidate the assets I have online?
Thanks in advance.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:20 (9 by maintainers)
Top Results From Across the Web
When and How to Invalidate Cache - Lu's blog
In this post, I will talk about one way to figure out when to invalidate cache entries. I will use a specific setup...
Read more >Clear your cached content with Cache Invalidation
Click on the Cache Controls tab. · Scroll down to the Cache invalidation section. · Under Hostname field, click the dropdown menu and...
Read more >Cache Invalidation — Is there a General Solution?
The problem in cache invalidation is that stuff changes without us knowing about it. So, in some cases, a solution is possible if...
Read more >How to invalidate API Gateway Cache - Tutorials Dojo
How to invalidate API Gateway Cache ; Fail the request with 403 status code: returns a 403 Unauthorized response. ; Ignore cache control...
Read more >Cache busting vs cache invalidation - Read, Write, Exercise
The major benefit of cache invalidation is that it can be simpler than cache busting. When you create a new version of an...
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 Free
Top 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
Great, thanks for posting! I’m sure you’re not the first nor the last, so others will find this useful 😄
@prateekbh Thank you for your time in this matter. I actually managed just using the
copy-webpack-plugin
and copying the_redirects
from a different directory thanassets/
.I’ll just leave my two cents here and say that although
preact-cli
templates are wonderful for picking up, it gets in the way real quick. Mine is such a small application (2 screens, a handful of component) and I already detected a bunch of issues due to the project opaqueness. A summary of its components and their function within the context of your application – what is copied where, which files get what transformations, etc. – would come a long way.Thanks again! o/