interface CacheOptions { /** Path to the SQLite database file. Defaults to in-memory. */ path?: string; /** Interval in ms for automatic cleanup of expired entries. Set to 0 to disable. Defaults to 60000. */ cleanupInterval?: number; } declare class Cache { private; constructor(options?: CacheOptions); /** Store a value with optional TTL in seconds. Null/undefined deletes the key. */ set(key: string, value: T, ttl?: number): void; /** Retrieve a value. Returns undefined if not found or expired. */ get(key: string): T | undefined; /** Delete a key. */ del(key: string): void; /** Delete multiple keys. */ mdel(keys: string[]): void; /** Check if a key exists and is not expired. */ has(key: string): boolean; /** Get remaining TTL in seconds. Returns undefined if key doesn't exist, null if no expiry. */ ttl(key: string): number | null | undefined; /** Set or update expiry on an existing key. Returns true if key exists and is not expired. */ expire(key: string, ttl: number | null): boolean; /** Atomically increment a numeric value. Preserves existing TTL. */ incr(key: string, by?: number): number; /** Atomically decrement a numeric value. Preserves existing TTL. */ decr(key: string, by?: number): number; /** Get multiple values at once. */ mget(keys: string[]): Map; /** Set multiple values at once with optional TTL. Null/undefined values are skipped. */ mset(entries: Map | Array<[string, T]> | Record, ttl?: number): void; /** List keys matching a pattern. Use * for wildcard, ? for single char. */ keys(pattern?: string): string[]; /** Get the number of non-expired entries. */ size(): number; /** Delete all entries. */ clear(): void; /** Remove expired entries. Returns number of entries removed. */ cleanup(): number; /** Close the database connection and stop cleanup timer. */ close(): void; } export { Cache as default, CacheOptions, Cache };