/**
 * Cache Service
 *
 * In-memory cache with TTL, persistence, and statistics.
 *
 * @since v1.29.0
 */
import { type CacheConfig, type CacheDebugExport, type CacheOptions, type CacheStats, type CacheWarmer, type ExtendedCacheStats, type PreloadResult, type WarmingResult } from './cache-types.js';
/**
 * Cache service for storing and retrieving data with TTL
 */
export declare class CacheService {
    private memory;
    private config;
    private stats;
    private cleanupTimer;
    constructor(config?: Partial<CacheConfig>);
    /**
     * Start the periodic cleanup timer
     */
    private startCleanupTimer;
    /**
     * Stop the cleanup timer
     */
    stopCleanupTimer(): void;
    /**
     * Get a value from cache, optionally fetching if missing/stale
     */
    get<T>(key: string, fetcher?: () => Promise<T>, options?: CacheOptions): Promise<T | undefined>;
    /**
     * Get a value synchronously (no fetcher)
     */
    getSync<T>(key: string): T | undefined;
    /**
     * Check if a key exists and is not expired
     */
    has(key: string): boolean;
    /**
     * Set a value in the cache
     */
    set<T>(key: string, data: T, options?: CacheOptions): void;
    /**
     * Invalidate a specific key
     */
    invalidate(key: string): boolean;
    /**
     * Invalidate all keys matching a pattern
     */
    invalidatePattern(pattern: RegExp): number;
    /**
     * Invalidate all keys starting with a prefix
     */
    invalidatePrefix(prefix: string): number;
    /**
     * Clear all entries
     */
    clear(): void;
    /**
     * Ensure there's capacity for a new entry
     */
    private ensureCapacity;
    /**
     * Evict the oldest entry
     */
    private evictOldest;
    /**
     * Get total size of all entries
     */
    private getTotalSize;
    /**
     * Clean up expired entries
     */
    cleanup(): number;
    /**
     * Get cache statistics
     */
    getStats(): CacheStats;
    /**
     * Reset statistics
     */
    resetStats(): void;
    /**
     * Get a formatted stats report
     */
    getStatsReport(): string;
    /**
     * Serialize the cache for persistence
     */
    serialize(): string;
    /**
     * Load from serialized data
     */
    static fromSerialized(data: string, config?: Partial<CacheConfig>): CacheService;
    /**
     * Get the number of entries
     */
    size(): number;
    /**
     * Get all keys
     */
    keys(): string[];
    /**
     * Get configuration
     */
    getConfig(): CacheConfig;
    /**
     * Update configuration
     */
    updateConfig(config: Partial<CacheConfig>): void;
    /**
     * Reset the service (for testing)
     */
    reset(): void;
    /**
     * Warm the cache with multiple entries
     *
     * Loads multiple cache entries in parallel. Entries that are already
     * cached are skipped. Returns results including any errors.
     */
    warmCache<T>(warmers: CacheWarmer<T>[]): Promise<WarmingResult>;
    /**
     * Preload specific keys using a loader function
     *
     * Only loads keys that are not already cached.
     */
    preload<T>(keys: string[], loader: (key: string) => Promise<T>, options?: CacheOptions): Promise<PreloadResult>;
    /**
     * Get memory pressure as a percentage (0-100)
     *
     * Based on both entry count and total size limits.
     */
    getMemoryPressure(): number;
    /**
     * Get extended statistics including memory info
     */
    getExtendedStats(): ExtendedCacheStats;
    /**
     * Get the oldest entry's age in milliseconds
     */
    getOldestEntryAge(): number;
    /**
     * Get the newest entry's age in milliseconds
     */
    getNewestEntryAge(): number;
    /**
     * Export cache state for debugging
     *
     * Returns a human-readable snapshot of the cache state.
     * Useful for debugging and analysis.
     */
    exportDebugInfo(): CacheDebugExport;
    /**
     * Format debug export as a readable string
     */
    formatDebugExport(): string;
}
/**
 * Get the singleton cache service
 */
export declare function getCacheService(): CacheService;
/**
 * Reset the singleton (for testing)
 */
export declare function resetCacheService(): void;
/**
 * Generate a cache key from parts
 */
export declare function generateCacheKey(source: string, endpoint: string, params?: Record<string, unknown>): string;
//# sourceMappingURL=cache-service.d.ts.map