evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
Utility to persist content in a disk-backed cache by human-readable keys while attaching metadata to each entry.
export async function saveContent(cachePath, key, content, options);
/**
* Stores string or Buffer content at the given key with metadata.
* Resolves to the integrity string for the stored content.
* options.metadata holds user-supplied metadata; options.expectedSize enforces byte length.
* options.algorithms optionally overrides hashing algorithms.
*/
export async function saveStream(cachePath, key, readable, options);
/**
* Streams data from a readable into cache under the key with metadata.
* Resolves to an object containing integrity and size numbers after the stream finishes.
* options.metadata holds user-supplied metadata; options.expectedSize enforces byte length when provided.
* Emits size/integrity through resolved return, not events.
*/
export async function saveJson(cachePath, key, data, options);
/**
* Serializes a plain object to JSON and stores it under the key with metadata.
* Automatically sets metadata.contentType = 'application/json' when not already provided.
* Resolves to the integrity string for the stored JSON payload.
*/Provides the disk-backed cache with keyed writes, streaming support, and metadata storage. @satisfied-by