Longest stored usable prefix for prompt/ns — index-only, no I/O.
handle is the tier's opaque entry token, passed back to restore.
OptionalfindRestore GPU-visible state. The default SSD backend copies into owned arrays. An optional backing release runs after consumers dispose their arrays. Null on any failure.
OptionalrestoreOptionalrestoreTensor objects have no target layers; restore with their own schema.
Borrow live caches and finish persistence before returning. A false result prevents a required demotion.
Optionalattachments: CheckpointAttachment[]
The cold (SSD) tier the RAM cache tiers over. Structural — this module never imports ssd-cache (which imports us); the server binds SsdCacheStore + the model into this shape (apps/mlx-bun/src/engine/cache-services.ts). Lookup and restore failures return null; store returns false on failure. Operations that require persistence retain their donor if storing fails.