-
Notifications
You must be signed in to change notification settings - Fork 812
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Runtime cache questions and exclude files #1445
Comments
Lifespan of runtime cache (I believe) works like this:
I have filed an issue around workbox having an imperative way to delete cache and IndexedDBs (which will also persist) #1365 Also, left some tips and a video link here: #1407 Basically, as the developer of your app, you have to make sure that you own the expiration strategy of your caches, especially if there is anything remotely sensitive or user identifiable (if you would like to respect a user's privacy). Workbox has a lot of great utilities, but ultimately if you don't add your own logic to clear up renamed caches, clear up API schema changes from older API versions, etc. it won't do anything automatically, and you may end up with a cache graveyard in your users browser. What we did, is that during our worker's That way Cache expiration logic is enforced on each activation of a new worker. But each app will probably have their own expiration strategies that work for them. |
Library Affected:
Workbox 3.1.0, generateSW() with CLI
Browser & Platform:
Chrome 66 (OSX)
Issue or Feature Request Description:
Is it possible to exclude files from the runtime cache? I am trying to exclude gtm.js and analytics.js from the runtime cache but I'm not having much luck. In runtimeCaching I was hoping I could exclude it there using:
But it doesn't change anything. Is it possible to disable the runtime cache completely?
Out of interest what is the lifespan of the runtime cache? Is it disposed of every time a user closes the browser? Or does it persist like the pre-cache and then look for updates on the next page load?
Thanks for the excellent library!
The text was updated successfully, but these errors were encountered: