Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Add cache capabilities to the SW #98

Open
delapuente opened this issue Feb 2, 2018 · 1 comment
Open

Add cache capabilities to the SW #98

delapuente opened this issue Feb 2, 2018 · 1 comment
Labels
ARCHIVED CLOSED at time of archiving enhancement

Comments

@delapuente
Copy link
Contributor

No description provided.

@cvan
Copy link
Contributor

cvan commented Feb 6, 2018

Thanks for filing this. Which caching strategy did you have in mind? Are you thinking of precaching everything or cache+network -> update or network -> cache?

I'm leaning toward stale-while-revalidate.

You're a Service Worker pro, so I'll defer this to you. If you want to write

I had a branch of using workbox (just checking in the files in a vendor/ directory, instead of requiring npm + Node, etc.).

I've been wondering if there's some way we can get Unity to calculate a hash of the file contents and bump the cache key in the Service Worker file (sw.js). In the past, I've written simple Node scripts to do this when I've written Service Workers manually (without workbox and its predecessors).

Let me know your thoughts.

@cknowles-admin cknowles-admin added the ARCHIVED CLOSED at time of archiving label Jul 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ARCHIVED CLOSED at time of archiving enhancement
Projects
None yet
Development

No branches or pull requests

3 participants