Cache Storage gets wiped on reload. How to stop this?
❔ Question
When I hit reload, the entire Cache Storage gets wiped, including caches I created -- which I need to persist across reloads -- is this expected behavior? Is there a way to stop this?
Link to sandbox: link (optional)
Your Environment
| Software | Name/Version |
|---|---|
| Сodesandbox | |
| Browser | |
| Operating System |
Hey @adrianloh ,
Can you please provide a link to your sandbox, and detail a bit current vs. expected behavior? Also, what browser are you using?
@adrianloh I'm guessing this is because of this line https://github.com/codesandbox/codesandbox-client/blob/67a5a08568f3373c2afd31f20213c47016a93a91/packages/common/src/registerServiceWorker.ts#L94
it is triggered during the serviceWorker registration, if the installation state is redundant and the navigator.storage.estimate() gives a usage of at least 95% of the available quota.
Then the cache is deleted...
Hey @adrianloh ,
Did you figure this out, or it's still an issue for you?
Closed for lack of activity