import { Redis, Cluster, RedisOptions } from 'ioredis'; import { BaseDriver } from './base_driver.js'; import { R as RedisConfig, b as CreateDriverResult, c as L2CacheDriver, B as BusOptions, d as CreateBusDriverResult } from '../../bento_cache-KhHDdh3u.js'; import '@poppinss/exception'; import '@boringnode/bus/types/main'; import '@julr/utils/logger'; import 'knex'; import 'kysely'; import '@aws-sdk/client-dynamodb'; import 'orchid-orm'; /** * Create a new cache redis driver */ declare function redisDriver(options: RedisConfig): CreateDriverResult; /** * Create a new bus redis driver. It leverages the Pub/sub capabilities of Redis * to sending messages between your different processes. * * You can pass either connection options or an existing Redis/Cluster instance. */ declare function redisBusDriver(options: { connection: RedisOptions | Redis | Cluster; } & BusOptions): CreateBusDriverResult; /** * Caching driver for Redis */ declare class RedisDriver extends BaseDriver implements L2CacheDriver { #private; type: "l2"; config: RedisConfig; constructor(config: RedisConfig); getConnection(): Redis | Cluster; /** * Returns a new instance of the driver namespaced */ namespace(namespace: string): RedisDriver; /** * Get a value from the cache */ get(key: string): Promise; /** * Get the value of a key and delete it * * Returns the value if the key exists, undefined otherwise */ pull(key: string): Promise; /** * Put a value in the cache * Returns true if the value was set, false otherwise */ set(key: string, value: string, ttl?: number): Promise; /** * Remove all items from the cache */ clear(): Promise; /** * Delete a key from the cache * Returns true if the key was deleted, false otherwise */ delete(key: string): Promise; /** * Delete multiple keys from the cache */ deleteMany(keys: string[]): Promise; /** * Closes the connection to the cache */ disconnect(): Promise; } export { RedisDriver, redisBusDriver, redisDriver };