Entries movement between caches
Nobody has claimed this yet.
- Dominant language
- Bikeshed
- Stars
- 3.6k
- Forks
- 324
- Avg merge
- 14d 22h
- Merged PRs (30d)
- 1
Description
I have a such situation:
One primary cache, let's call it static. This cache always exists, never changes name and only entries in it are changed. Difference is found by comparing two maps 1) existing, described currently cached entries; 2) new, which came with a newly generate SW (new build). Difference is computed on install event and new assets/files are stored in tmp cache. Then, on activate event, old assets are deleted from static cache or simply overridden by new version (if file name/url wan't changed).
My question, can we have some fastest way to import entries from one cache to another? Because as far as I understand, reading from one cache and writing to another is kind of slow and not "looking good" operation.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the cache operations described for the install and activate events, focusing on moving entries from the tmp cache into the static cache. Determine whether the Service Worker cache API provides a direct import operation rather than read-and-write copying, and document the supported approach or the missing capability.
Written by the indexing model from the issue text.
Assessment
- Domain
- web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100