/** * SMI-578: CacheRepository - Cache storage for search results and API responses */ import type { Database as DatabaseType } from '../db/database-interface.js'; import type { CacheEntry } from '../types/skill.js'; /** * Repository for cache operations */ export declare class CacheRepository { private db; private stmts; constructor(db: DatabaseType); private prepareStatements; private rowToEntry; /** * Get a cached value by key */ get(key: string): T | null; /** * Get raw cache entry with metadata */ getEntry(key: string): CacheEntry | null; /** * Set a cached value with optional TTL in seconds */ set(key: string, value: T, ttlSeconds?: number): void; /** * Delete a cached value */ delete(key: string): boolean; /** * Delete all expired entries */ deleteExpired(): number; /** * Clear all cache entries */ clear(): number; /** * Check if a key exists (and is not expired) */ has(key: string): boolean; /** * Count active cache entries */ count(): number; /** * Get all keys matching a pattern */ keys(pattern?: string): string[]; /** * Get or set a cached value */ getOrSet(key: string, factory: () => T, ttlSeconds?: number): T; /** * Get or set a cached value (async version) */ getOrSetAsync(key: string, factory: () => Promise, ttlSeconds?: number): Promise; } //# sourceMappingURL=CacheRepository.d.ts.map