Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/harmony/src/cache/redis.ts>RedisCacheAdapter

An easy to use Discord API Library for Deno.
Go to Latest
class RedisCacheAdapter
implements ICacheAdapter
import { RedisCacheAdapter } from "https://deno.land/x/harmony@v2.6.0/src/cache/redis.ts";

Redis Cache Adapter for using Redis as a cache-provider.

Constructors

new
RedisCacheAdapter(options: RedisConnectOptions)

Properties

private
optional
_expireInterval: number
readonly
_expireIntervalTimer: number
_redis: Promise<Redis>
ready: boolean
optional
redis: Redis

Methods

private
_startExpireInterval(): void
_checkReady(): Promise<void>
array<T>(cacheName: string): Promise<T[] | undefined>
delete(cacheName: string, ...keys: string[]): Promise<boolean>
deleteCache(cacheName: string): Promise<boolean>
get<T>(cacheName: string, key: string): Promise<T | undefined>
keys(cacheName: string): Promise<string[] | undefined>
set<T>(
cacheName: string,
key: string,
value: T,
expire?: number,
): Promise<void>
size(cacheName: string): Promise<number | undefined>