import type { Key, SimpleStore, Value } from '@atproto-labs/simple-store'; export type SimpleStoreMemoryOptions = { /** * The maximum number of entries in the cache. */ max?: number; /** * The time-to-live of a cache entry, in milliseconds. */ ttl?: number; /** * Whether to automatically prune expired entries. */ ttlAutopurge?: boolean; /** * The maximum total size of the cache, in units defined by the sizeCalculation * function. * * @default No limit */ maxSize?: number; /** * The maximum size of a single cache entry, in units defined by the * sizeCalculation function. * * @default No limit */ maxEntrySize?: number; /** * A function that returns the size of a value. The size is used to determine * when the cache should be pruned, based on `maxSize`. * * @default The (rough) size in bytes used in memory. */ sizeCalculation?: (value: V, key: K) => number; } & (// Memory is not infinite, so at least one pruning option is required. { max: number; } | { maxSize: number; } | { ttl: number; ttlAutopurge: boolean; }); export declare class SimpleStoreMemory implements SimpleStore { #private; constructor({ sizeCalculation, ...options }: SimpleStoreMemoryOptions); get(key: K): V | undefined; set(key: K, value: V): void; del(key: K): void; clear(): void; } //# sourceMappingURL=index.d.ts.map