/** * Persistent cache for collection data to support offline/anonymous browsing */ import { IFileOperationsService } from '../services/FileOperationsService.js'; export interface CollectionItem { name: string; path: string; sha: string; content?: string; last_modified?: string; } export interface CollectionCacheEntry { items: CollectionItem[]; timestamp: number; etag?: string; } /** * Persistent cache for collection data that supports offline browsing */ export declare class CollectionCache { private cacheDir; private cacheFile; private readonly CACHE_TTL_MS; private readonly fileOperations; constructor(fileOperations: IFileOperationsService, baseDir?: string); getCacheFilePath(): string; /** * Initialize cache directory */ private ensureCacheDir; /** * Load collection data from persistent cache */ loadCache(): Promise; /** * Save collection data to persistent cache */ saveCache(items: CollectionItem[], etag?: string): Promise; /** * Search cached collection items with fuzzy matching */ searchCache(query: string): Promise; /** * Normalize search terms for better matching (handles spaces, dashes, etc.) */ private normalizeSearchTerm; /** * Get cached collection items by type/path */ getItemsByPath(pathPrefix: string): Promise; /** * Check if cache exists and is valid */ isCacheValid(): Promise; /** * Clear the cache */ clearCache(): Promise; /** * Get cache stats for debugging */ getCacheStats(): Promise<{ itemCount: number; cacheAge: number; isValid: boolean; }>; } //# sourceMappingURL=CollectionCache.d.ts.map