Master switch. Off = zero retention and (effectively) zero overhead.
Cap on retained network entries (oldest dropped past this).
Cacheable (binary) requests served from the persistent cache since the last clear.
Cacheable (binary) requests since the last clear (cache hits + network misses).
Total bytes downloaded over the network (not served from cache) since the last clear — i.e. the actual data pulled from data sources (≈ quota usage).
Total bytes served from the persistent cache since the last clear (network saved).
Whether the persistent Cache Storage is usable (false outside a secure context — e.g. the dev server opened over a LAN IP rather than localhost/https). When false NOTHING persists across reloads, regardless of keys.
Tiles successfully written to the persistent cache since the last clear.
Failed persistent-cache writes since the last clear (quota, or a Response the Cache API refuses). If this climbs while cacheWrites stays 0, writes are the reason nothing persists; the first failure is logged to the console with its cause.
Retained network loads, oldest first.
Records a load downloaded from a data source over the network. cacheable marks
loads that go through the persistent cache (so they count toward the hit ratio);
non-cacheable loads (root.json / layer.json) are listed but excluded from the ratio.
Records a request served from the persistent cache.
Records a successful persistent-cache write.
Records a failed persistent-cache write; console-logs the first cause so a write that's silently defeating persistence (Vary header, quota, …) is visible. Counts regardless of enabled so the tally is meaningful whenever the view opens.
Clears retained entries and resets the cache counters.
Subscribes to changes; returns an unsubscribe fn.
Optional instrumentation of data-source loads, for diagnosing what's hitting the network vs. the persistent cache. DISABLED by default: while enabled is false every record call early-returns, so the only cost on the load path is a single boolean test and nothing is retained.
When enabled it counts cacheable (binary) requests served from cache vs. total, and keeps the last maxEntries NETWORK loads in a ring buffer (cache hits are counted only, not retained, to keep it light). Subscribe for change notifications to drive a view; the notify is coalesced by the view (rAF), not here.