/** * SMI-585/SMI-644: Cache exports * Two-tier caching with TTL management for search results */ export { L1Cache } from './lru.js'; export type { SearchCacheEntry, SearchResult, CacheStats } from './lru.js'; export { L2Cache } from './sqlite.js'; export type { L2CacheOptions } from './sqlite.js'; export { TTLTier, POPULARITY_THRESHOLDS, createCacheEntry, recordHit, calculateTTLTier, isExpired, shouldRefresh, isValidCacheKey, serializeCacheEntry, deserializeCacheEntry, getTTLTierName, } from './CacheEntry.js'; export type { CacheEntry, SerializedCacheEntry } from './CacheEntry.js'; export { EnhancedTieredCache } from './TieredCache.js'; export type { L1Config, L2Config, TieredCacheConfig, TieredCacheStats } from './TieredCache.js'; export { CacheManager } from './CacheManager.js'; export type { SearchOptions, RefreshCallback, CacheManagerConfig } from './CacheManager.js'; import { type SearchResult, type CacheStats } from './lru.js'; import { type L2CacheOptions } from './sqlite.js'; export interface TieredCacheOptions { l1MaxSize?: number; l2Options?: L2CacheOptions; } /** * Two-tier cache combining L1 (memory) and L2 (SQLite) */ export declare class TieredCache { private l1; private l2; /** * @deprecated If l2Options is passed, use TieredCache.create(options) — async factory * with WASM fallback. Passing l2Options to this constructor throws to prevent silent * data loss. */ constructor(options?: TieredCacheOptions); /** * Async factory — supports both native and WASM SQLite. * * @param options - Cache options; l2Options.dbPath is opened via createDatabaseAsync * @returns Fully initialised TieredCache instance */ static create(options?: TieredCacheOptions): Promise; /** * Get from cache, checking L1 first, then L2 */ get(key: string): { results: SearchResult[]; totalCount: number; } | undefined; /** * Store in both cache tiers */ set(key: string, results: SearchResult[], totalCount: number): void; /** * Check if key exists in either tier */ has(key: string): boolean; /** * Invalidate all caches (called when index updates) */ invalidateAll(): void; /** * Get combined stats */ getStats(): { l1: CacheStats; l2: CacheStats | null; }; /** * Prune expired entries */ prune(): void; /** * Close L2 database */ close(): void; } //# sourceMappingURL=index.d.ts.map