mlx-bun library API
    Preparing search index...
    • Zero-copy in-memory clone of a cache list at its CURRENT state — new cache instances holding slice VIEWS of the live tensors (mlx arrays are immutable: continued generation replaces the source caches' internal arrays, it never mutates the shared buffers, so views are stable). Built for the prompt-boundary prompt-cache snapshot (multi-turn agent traffic: the reply's decode→encode roundtrip drift makes prompt+gen entries untrimmable at context > sliding window — a prompt-only entry is ALWAYS an exact prefix of the next turn, immune to drift). Must be called while the caches hold EXACTLY the state to snapshot (post-wrap rings cannot be rewound later). Same per-kind dispatch as snapshotCache/loadKvCache.

      Parameters

      Returns Cache[]