Home > widget-integration > LOCAL_STORAGE_EVICTION_TIERS
LOCAL_STORAGE_EVICTION_TIERS variable
Boost-owned localStorage keys that may be evicted to reclaim quota, ordered cheapest-to-lose first.
Every app on a storefront shares one ~5MB localStorage budget per origin. When that budget runs out, setItem throws QuotaExceededError and Boost can no longer persist anything. Rather than fail the write, FilterStorageHelper walks these tiers, dropping one tier at a time and retrying, so we evict as little as possible.
Signature:
LOCAL_STORAGE_EVICTION_TIERS: ReadonlyArray<ReadonlyArray<string | RegExp>>
Remarks
Only keys Boost itself writes belong here. Removing another app's keys would break their features (wishlists, customer identity, cart tokens) and is never an acceptable way to make room for our own data.
Tier order reflects cost of loss: 1. Template caches - large and fully regenerable from the template API 2. Transient query state - rebuilt on the next search or filter request 3. Analytics attribution - degrades reporting only, never the UI 4. User-facing preferences and caches - last resort, visibly affects shoppers
Keys owned by other modules are listed literally because those modules keep their storage keys private; the owning module is named alongside each entry.