import { AppStashResult } from 'appstash'; import { CacheManagerConfig, CacheMetadata, CacheEntryInfo } from './types'; export declare class CacheManager { private config; private dirs; private reposDir; private metadataDir; constructor(config: CacheManagerConfig); /** * Public accessor for the repos cache directory path. */ getReposDir(): string; /** * Public accessor for the metadata cache directory path. */ getMetadataDir(): string; /** * Public accessor for resolved appstash directories. */ getAppstashDirs(): AppStashResult; /** * Get cached directory path if exists and not expired * Returns null if not cached or expired */ get(key: string): string | null; /** * Store directory in cache with metadata * Does NOT perform cloning - just registers the directory */ set(key: string, sourcePath: string): string; /** * Check if cache entry is expired based on TTL * Returns null if no metadata or not expired, returns metadata if expired */ checkExpiration(key: string): CacheMetadata | null; /** * Clear specific cache entry */ clear(key: string): void; /** * Clear all cache entries */ clearAll(): void; /** * List all cache entries with expiration status */ listAll(): CacheEntryInfo[]; /** * Get metadata for a cache entry */ getMetadata(key: string): CacheMetadata | null; /** * Create a cache key from identifier (e.g., git URL + branch) */ createKey(identifier: string, variant?: string): string; private ensureDirectories; private isExpired; private getCachePath; private getMetadataPath; }