/**
 * Cache Storage Layer
 *
 * Low-level cache storage with integrity protection using SHA-256 checksums.
 * Handles reading/writing cache files and validating their integrity.
 */
import type { CacheConfig, CacheEntryMeta, CacheEntryName, CacheLoadResult, CacheManifest } from './types.js';
/**
 * Cache storage class
 */
export declare class CacheStorage {
    private config;
    private manifest;
    private manifestLoaded;
    constructor(config?: Partial<CacheConfig>);
    /**
     * Ensure the cache directory exists
     */
    ensureCacheDir(): Promise<void>;
    /**
     * Load the cache manifest
     */
    loadManifest(): Promise<CacheManifest>;
    /**
     * Save the cache manifest
     */
    private saveManifest;
    /**
     * Create an empty manifest
     */
    private createEmptyManifest;
    /**
     * Read a cache entry with integrity validation
     */
    read<T>(entryName: CacheEntryName, ttlMs: number): Promise<CacheLoadResult<T>>;
    /**
     * Write a cache entry with checksum
     */
    write<T>(entryName: CacheEntryName, data: T, ttlMs: number, formatVersion?: string): Promise<void>;
    /**
     * Delete a cache entry
     */
    delete(entryName: CacheEntryName): Promise<boolean>;
    /**
     * Clear all cache entries
     */
    clear(): Promise<void>;
    /**
     * Get cache entry metadata
     */
    getMeta(entryName: CacheEntryName): Promise<CacheEntryMeta | null>;
    /**
     * Check if a cache entry exists and is fresh
     */
    isFresh(entryName: CacheEntryName, ttlMs: number): Promise<boolean>;
    /**
     * Get cache statistics
     */
    getStats(): Promise<{
        entryCount: number;
        entries: Array<{
            name: string;
            updatedAt: string;
            ageMs: number;
            isFresh: boolean;
            ttlMs: number;
        }>;
    }>;
}
/**
 * Get or create the global cache storage instance
 */
export declare function getCacheStorage(config?: Partial<CacheConfig>): CacheStorage;
/**
 * Reset the global cache storage (mainly for testing)
 */
export declare function resetCacheStorage(): void;
//# sourceMappingURL=storage.d.ts.map