Expand description
Serialize / deserialize a paged KV cache via a BlobStore.
Per agent_docs/cache-layer.md the K and V buffers of each physical page
are content-addressed independently so a fork that mutates only V (e.g.
a one-token decode step) shares its K page with siblings. The
pf_core::cas::FsBlobStore does the zstd-19 compression at rest, so we
pass raw bytes here.
Structs§
- Deserialized
Cache - Output of
deserialize_pages.
Functions§
- deserialize_
pages - Inverse of
serialize_pages. Loads thePageManifestatdigest, fetches every K/V blob, and yields(ix, PageBytes)pairs in canonical order along with the logical-seqs and metadata needed to rebuild the engine’s page table. - serialize_
pages - Serialize a list of (ix, K-bytes, V-bytes) page tuples + the
per-sequence logical mapping into a
PageManifestand persist every blob throughblobs. Returns the digest of the manifest itself, ready to drop into the.pfimgcache.manifestfield.