greeting (tag: demo)
—
A small TTL / dedup / stale-while-revalidate cache, built on top of a
get()/set()/delete()/keys() backend
interface — so the same policy logic runs unmodified whether the backend is a plain
in-memory Map or the browser's native CacheStorage/Cache
API (used directly from the page — no service worker needed). Compare with
ServiceWorkerDemo, which uses that same native Cache API
but as a cache-first proxy for network requests inside a service worker.
See README.md for a step-by-step walkthrough.
These two populate themselves on load, backed by a fixed instance each — no setup required. Just reload the page (the button above works) and look again: whatever state you left steps above in doesn't matter.