API.md

@lazarv/react-server/storage-cache

Durable cache backend built on unstorage. Supports any unstorage driver — Redis, Cloudflare KV, Upstash, filesystem, etc.

function rawCanonicalKey(tags: unknown[]): string;
function syncHash(str: string): string;
class StorageCache implements ReactServerCache { constructor(driver: Driver, options?: { type?: "raw" | "rsc"; }); get<T = unknown>(keys: string[]): Promise<T | undefined>; set<T = unknown>(keys: string[], value: T): Promise<void>; has(keys: string[]): Promise<boolean>; setExpiry(keys: string[], ttl: number): Promise<void>; hasExpiry(keys: string[], ttl: number): Promise<boolean>; delete(keys: string[]): Promise<void>; }