-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add caching to service worker (#92)
* feat: naive cache implmentation * fix: only cache successful responses * feat: improve cache mechanism * fix: linting errors * refactor: move caching logic to separate functions also make sure that we actually store reponse in cache when fetching it in the background * fix: small optimisation * chore: change log to trace * chore: PR comments and minor improvements * fix: use sw-cache-expires * chore: cleanup hasExpired return * chore: log on cache miss * chore: wait for response so we can cache it * chore: minor cleanup * chore: minor cleanup * fix: stale-while-revalidate for ipns * chore: move magic number to constant --------- Co-authored-by: Daniel N <2color@users.noreply.github.com> Co-authored-by: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com>
- Loading branch information
1 parent
220e9cb
commit 4674dd0
Showing
1 changed file
with
110 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters