RedisCache class
Class RedisCache. Implements a cache engine on top of Redis.
Signature:
export declare class RedisCache implements ICache
Implements: ICache
Properties
|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
string |
This adapter instance's name, | ||
|
The effective options after merging user input over DEFAULT_REDIS_CACHE_OPTIONS. | |||
|
boolean |
True once RedisCache.init() has completed successfully. |
Methods
|
Method |
Modifiers |
Description |
|---|---|---|
|
Removes the value stored in the cache under the given key. | ||
|
|
Safely destroys the Redis connection. | |
|
Returns the value stored in the cache under a given key. | ||
|
Initializes the cache instance. The underlying Redis connection is shared between all instances; concurrent initializations share a single connection attempt. | ||
|
Purges all keys from the cache matching a given wildcard mask. | ||
|
Stores the given value in the cache under the given key. If TTL is specified, the cached value will expire after the given number of milliseconds. If the NX argument is set to true, the key:value pair is created only if it does not exist yet. The given value can be any JSON-compatible object and will be serialized automatically. |
Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.