import { GenericObject } from "@mongez/reinforcements"; import { RedisClientOptions, createClient } from "redis"; import { CacheDriver } from "../types"; import { BaseCacheDriver } from "./base-cache-driver"; export type RedisOptions = { /** * Redis Port * * @default 6379 */ port?: number; /** * Redis Host */ host?: string; /** * Redis Username */ username?: string; /** * Redis Password */ password?: string; /** * Redis URL * * If used, it will override the host and port options */ url?: string; /** * Global prefix for the cache key */ globalPrefix?: string | (() => string); /** * Time to live in seconds * * @default Infinity */ ttl?: number; /** * Redis client options */ clientOptions?: RedisClientOptions; }; export declare class RedisCacheDriver extends BaseCacheDriver, RedisOptions> implements CacheDriver, RedisOptions> { /** * Cache driver name */ name: string; /** * {@inheritDoc} */ removeNamespace(namespace: string): Promise; /** * {@inheritdoc} */ parseKey(key: string | GenericObject): string; /** * {@inheritDoc} */ set(key: string | GenericObject, value: any, ttl?: number): Promise; /** * {@inheritDoc} */ get(key: string | GenericObject): Promise; /** * {@inheritDoc} */ remove(key: string | GenericObject): Promise; /** * {@inheritDoc} */ flush(): Promise; /** * {@inheritDoc} */ connect(): Promise; } //# sourceMappingURL=redis-cache-driver.d.ts.map