evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
Provide a small module that streams cached content by key while surfacing metadata, integrity, and size information without loading the entire payload into memory.
export interface StreamCallbacks {
onMetadata?: (info: { key: string; integrity: string; size: number; metadata?: any }) => void;
onIntegrity?: (integrity: string) => void;
onSize?: (size: number) => void;
}
export interface StreamOptions extends StreamCallbacks {
cachePath: string;
key: string;
expectedIntegrity?: string;
}
export function streamCachedContent(options: StreamOptions): import('stream').Readable;Provides streaming cache reads that surface metadata, integrity, and size information.