/** * @b9g/cache-redis - Redis cache adapter for Shovel * * Provides Redis-backed caching with HTTP-aware storage and retrieval */ import { Cache, type CacheQueryOptions } from "@b9g/cache"; import { type RedisClientOptions } from "redis"; export interface RedisCacheOptions { /** Redis connection options */ redis?: RedisClientOptions; /** Cache name prefix for Redis keys */ prefix?: string; /** Default TTL in seconds (0 = no expiration) */ defaultTTL?: number; /** Maximum cache entry size in bytes */ maxEntrySize?: number; } /** * Redis-backed cache implementation * Stores HTTP responses with proper serialization and TTL support */ export declare class RedisCache extends Cache { #private; constructor(name: string, options?: RedisCacheOptions); /** * Returns a Promise that resolves to the response associated with the first matching request */ match(request: Request, options?: CacheQueryOptions): Promise; /** * Puts a request/response pair into the cache */ put(request: Request, response: Response): Promise; /** * Finds the cache entry whose key is the request, and if found, deletes it and returns true */ delete(request: Request, options?: CacheQueryOptions): Promise; /** * Returns a Promise that resolves to an array of cache keys (Request objects) */ keys(request?: Request, options?: CacheQueryOptions): Promise; /** * Dispose of Redis client connection * Call this during graceful shutdown to properly close Redis connections */ dispose(): Promise; } export default RedisCache;