Tile Store
Persistent backing for CachedTileSource — read/write/evict tile blobs keyed by (z, x, y). The store is the cache; CachedTileSource is the cache-aware view that combines a store with an underlying network TileSource.
Implementations:
GeoPackage on JVM/Android (tiles table +
im_vector_tiles_mapboxextension for MVT).IndexedDB / Cache API on JS.
cachePolicy is enforced lazily — implementations may evict during writeTile when the policy is bounded, or on demand via evict.
Inheritors
Functions
Refresh a tile's freshness timestamp WITHOUT rewriting its bytes — the conditional-GET 304 Not Modified path. Restarts the stale-while-revalidate window so a still-current tile isn't re-requested every frame. Default no-op for stores that don't track freshness.
bumpValidatedAt for many tiles at once — keys packed by tileKey. Stores that commit per call should override this with a single-transaction implementation so a coalesced restamp burst costs one commit instead of one per tile.
Drop a tile from the store (after a server-side delete, manual eviction, etc.).
Apply cachePolicy now. Idempotent / unbounded policy → no-op.
Persist sector as the store's content bounding box — the data-availability extent a bulk download records (e.g. gpkg_contents). Default no-op for stores without one.