/** * Cache Storage API wrapper. * Provides a simplified interface for caching responses and assets. */ /** * Cache handle interface for managing cached resources. */ export interface CacheHandle { /** * Add a resource to the cache by URL. * Fetches the resource and stores the response. * @param url - URL to fetch and cache */ add(url: string): Promise; /** * Add multiple resources to the cache. * @param urls - Array of URLs to fetch and cache */ addAll(urls: string[]): Promise; /** * Store a custom response in the cache. * @param url - URL key for the cached response * @param response - Response object to cache */ put(url: string, response: Response): Promise; /** * Retrieve a cached response. * @param url - URL to look up * @returns Cached Response or undefined if not found */ match(url: string): Promise; /** * Remove a cached response. * @param url - URL to remove from cache * @returns True if the entry was deleted */ remove(url: string): Promise; /** * Get all cached request URLs. * @returns Array of cached URLs */ keys(): Promise; } /** * Cache manager for accessing the Cache Storage API. */ export declare const cache: { /** * Check if Cache Storage API is supported. * @returns True if caches API is available */ isSupported(): boolean; /** * Open or create a named cache. * @param name - Cache name * @returns CacheHandle for cache operations */ open(name: string): Promise; /** * Delete a named cache. * @param name - Cache name to delete * @returns True if the cache was deleted */ delete(name: string): Promise; /** * List all cache names. * @returns Array of cache names */ keys(): Promise; }; //# sourceMappingURL=cache.d.ts.map