Function: applyMessageCacheControl()
applyMessageCacheControl(
messages,lastMessages,ttl?):void
Defined in: packages/core/src/prompt-cache.ts:328
Stamp up to lastMessages trailing messages that do not already carry
a cache stamp (message-level or content-part). Walks backward so a
file-stamped last user turn is skipped and an earlier turn can take
the remaining slot. Mutates in place.
Parameters
messages
Record<string, unknown>[]
lastMessages
number
ttl?
Returns
void