Skip to content

Delete stale caches on service worker activate #917

Description

@RUKAYAT-CODER

Overview
src/serviceWorker.ts uses fixed cache names (static-js, static-css, images, api-responses) and the activate handler (lines 147-153) only calls clientsClaim() without deleting old caches. Because StaleWhileRevalidate caches content-hashed JS/CSS under non-versioned cache names, entries from prior deployments accumulate indefinitely. Add a cache-name version and delete non-current caches during activate.

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions