import { Layer } from "effect"; import { RuntimeCache } from "@vercel/functions"; import { Persistence } from "effect/persistence"; //#region src/RuntimeCache.d.ts /** * A `BackingPersistence` over `cache`. * * Entries are keyed by the JSON pair `[storeId, key]`, so no two stores share * a key. Each entry is tagged with a hash of the store id, since tags are * joined with `,` and sent unescaped, and `clear` expires that tag. Entries * are sent without a name, so keys don't reach Vercel's o11y or the request * headers, where non-Latin-1 characters would make the write fail. TTLs round * up to whole seconds, the cache's resolution. * * Each call runs in a `RuntimeCache.` client span with the store * id, and `get` records whether it hit. Keys stay out of span attributes and * error messages, which a failed span exports. * * `getCache()` hashes keys with a 32-bit hash by default, which can collide. * Pass a cache made with a stronger `keyHashFunction`, as `layerBacking` does. */ export declare const makeBacking: (cache: RuntimeCache) => Persistence.BackingPersistence["Service"]; /** `BackingPersistence` over `getCache()`, with SHA-256 key hashing. */ export declare const layerBacking: Layer.Layer; /** `Persistence` backed by the Vercel Runtime Cache. */ export declare const layer: Layer.Layer; //#endregion //# sourceMappingURL=RuntimeCache.d.ts.map