Ugh. That would work, but it’s such a hack. There should be a mechanism specifically for this. Is there’s no other good way?
I have a Javascript service worker implementation here: https://www.npmjs.com/package/cache-digest-immutable
Note: This is still based on a Golomb-coded set (GCS). Current proposal under discussion is to use a Cuckoo filter. Takes slightly more bandwidth but allows removal when browser caches evict items.