Skip to content

basalt / cache-tiered/src / TieredCacheOptions

Interface: TieredCacheOptions ​

Defined in: cache-tiered/src/index.ts:3

Properties ​

backfillTtlMs? ​

> optional backfillTtlMs?: number | null

Defined in: cache-tiered/src/index.ts:18

Upper bound (ms) on how long the NEAR layers keep an entry. Applied when backfilling a faster layer from a slower hit (the remaining TTL isn't known there) AND as a clamp on direct writes to every layer except the last — so after another replica updates or deletes a key, no replica serves its local copy for longer than this bound. There is no cross-replica invalidation bus; this bound IS the coherence contract. Default 60000 (1 minute). Set null for no bound (single-replica deployments only).


layers ​

> layers: CacheDriver[]

Defined in: cache-tiered/src/index.ts:8

Cache layers ordered fastest → slowest, e.g. [memory, redis]. A read checks each in turn; a hit backfills the faster layers it skipped.

Released under the MIT License.