question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to invalidate (bust) cache

See original GitHub issue

I 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:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:20 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
lukeedcommented, Jan 2, 2018

Great, thanks for posting! I’m sure you’re not the first nor the last, so others will find this useful 😄

1reaction
haggencommented, Jan 9, 2018

@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 than assets/.

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/

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found