RedisCacheStrategy
RedisCacheStrategy
A CacheStrategy which stores cached items in a Redis instance. This is a high-performance cache strategy which is suitable for production use.
Signature
class RedisCacheStrategy implements CacheStrategy {
constructor(options: RedisCachePluginInitOptions)
init() => ;
destroy() => ;
get(key: string) => Promise<T | undefined>;
set(key: string, value: T, options?: SetCacheKeyOptions) => Promise<void>;
delete(key: string) => Promise<void>;
invalidateTags(tags: string[]) => Promise<void>;
}
- Implements:
CacheStrategy
constructor
method
(options: RedisCachePluginInitOptions) => RedisCacheStrategy
init
method
() =>
destroy
method
() =>
get
method
(key: string) => Promise<T | undefined>
set
method
(key: string, value: T, options?: SetCacheKeyOptions) => Promise<void>
delete
method
(key: string) => Promise<void>
invalidateTags
method
(tags: string[]) => Promise<void>