ReadonlycodecsThe snapshot form of the composition's caches: how the scheduler copies live serial state it publishes.
Generation checkpoints every this many tokens; undefined: the service keeps none.
Exact tensor objects (encoder outputs) under the same budget and storage; absent without a prefix store.
Observes every prefix the cache stores, with its tokens.
request's state: its resumed generation, else the longest reusable prefix
of its prompt in namespace (its adapters, prepared media, method), else
fresh state. Ownership passes to the caller.
Admit request beside the requests already holding state: true admits it
(it holds its projected KV bytes until release), false means it waits.
Throws for a request that can never be admitted: one past the caches' own
position limit, or one over the KV budget alone.
An execution boundary passed: the cache may give optional state back to the allocator. Never changes a running request.
Save a resumable point of request's generation (owned caches; the cache
disposes them whatever happens).
After every request drained: flush, then clear the state even when
persistence fails (durable: false reports it). Idempotent.
Drop a session's affinity without deleting reusable state.
Whether admit would admit request now; holds nothing.
Make every kept prefix and checkpoint durable, as far as storage allows.
Whether state request publishes may be kept: the scheduler skips
copying state the cache would drop.
The longest prefix of promptIds held in RAM under namespace, which is
looked up as given (not under the composition's paging).
Start reading promptIds' saved prefix in namespace before the request
is admitted. The returned release ends the request's interest.
OptionalsessionId: stringOffer state covering tokens for reuse in namespace; the cache keeps or
drops it by its own policy. Ownership transfers on return; on a throw it
stays with the caller.
request is done: its KV bytes return to the budget; a completed
generation's checkpoints are removed, an interrupted one keeps them.
The token prefixes saved state holds (header metadata only).
Pending persistence: prefix snapshots and spills, and checkpoint writes.
Stop idle demotion ahead of draining requests; the state stays.
The composition's cache service (see the file header).