RedisCacheStrategy
A CacheStrategy which stores cached items in a Redis instance. This is a high-performance cache strategy which is suitable for production use.
Note: To use this strategy, you need to manually install the ioredis package:
- Implements:
CacheStrategy
constructor
method
(options: RedisCachePluginInitOptions) => RedisCacheStrategyinit
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>Was this chapter helpful?