/** * Cache storage layer using IndexedDB via @push.rocks/webstore */ import type { ICacheEntry } from '../webrequest.types.js'; export declare class CacheStore { private webstore; private initPromise; constructor(dbName?: string, storeName?: string); /** * Initialize the store */ private init; /** * Generate a cache key from a request */ generateCacheKey(request: Request): string; /** * Store a response in the cache */ set(cacheKey: string, entry: ICacheEntry): Promise; /** * Retrieve a cached response */ get(cacheKey: string): Promise; /** * Check if a cache entry exists */ has(cacheKey: string): Promise; /** * Delete a cache entry */ delete(cacheKey: string): Promise; /** * Clear all cache entries */ clear(): Promise; /** * Create a Response object from a cache entry */ responseFromCacheEntry(entry: ICacheEntry): Response; /** * Create a cache entry from a Response object */ cacheEntryFromResponse(url: string, response: Response, metadata?: { maxAge?: number; etag?: string; lastModified?: string; }): Promise; /** * Prune expired entries (garbage collection) * Returns the number of entries deleted */ pruneExpired(): Promise; }