Skip to content

const __CACHE_LAYOUTS: Readonly<Record<CacheKind, CacheFactory>>

Defined in: packages/cache/src/layouts.ts:16

Every eviction policy, keyed by the kind a cache built from it reports.

Every factory takes the same options record, so __CACHE_LAYOUTS[kind](options) builds any policy. Iterate this table instead of naming factories one by one: a property sweep, a benchmark, or a caller comparing policies covers every entry, and a policy added to CACHE_KINDS fails to typecheck until it is enrolled here too.