/** * The Cache API caches that @lionrapid/core owns, and the key prefix its * entries live under. * * WHY THIS MODULE EXISTS * * Core and @lionrapid/storage's optional Service Worker both use the Cache API * in the same origin, and both used to hardcode the literal `lionrapid-v1` * independently, with nothing asserting they agreed. They did agree, which was * the bug: the SW treated core's persisted translation store as its own HTTP * response cache and deleted it (`CLEAR_ALL`, an unfiltered `INVALIDATE_CACHE`, * and an `activate` sweep of every `lionrapid-`-prefixed cache). * * The fix is an OWNERSHIP RULE rather than a single shared name — see * `@lionrapid/storage`'s `sw-cache-policy.ts`. A shared constant cannot solve * the important half of the problem: a consumer who sets a custom `cacheName` * to escape the collision picks a name we cannot enumerate, so the only rule * that protects them is "the SW touches nothing it does not own". * * This module is still the single source of truth for the names CORE owns, so * the SW's ownership pattern can be asserted against them in a test and the two * packages cannot silently drift back into agreement. * * @module browser/storage/cache-names */ /** * Cache API cache names created by core. * * `translations` is the default store for `CacheStorageRepository` — a * consumer may override it via `options.cacheName`, so this is a default and * not an exhaustive list of caches core may end up using. * * `offlineFloor` is the never-expiring "last known good" layer that browser * auto-init installs by default (`data-offline="false"` disables it). It is * NOT overridable, so it is always exactly this string when present — which * made it the first real-world casualty of the SW's `lionrapid-` sweep. */ export declare const CORE_CACHE_NAMES: Readonly<{ readonly translations: "lionrapid-v1"; readonly offlineFloor: "lionrapid-offline-v1"; }>; /** * Synthetic https origin every core cache ENTRY is keyed under. * * The Cache API only accepts http/https URLs as keys, so core namespaces its * entries beneath this host rather than using a bare `lionrapid:` scheme. The * host never resolves; it only marks an entry as core-owned. Any code sharing a * cache with core can use this to tell core's entries apart from its own. */ export declare const CORE_CACHE_ENTRY_PREFIX = "https://cache.lionrapid.internal/"; //# sourceMappingURL=cache-names.d.ts.map