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?
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).
Thanks for filing this. Which caching strategy did you have in mind? Are you thinking of precaching everything or
cache+network -> update
ornetwork -> 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 avendor/
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 (withoutworkbox
and its predecessors).Let me know your thoughts.