***

title: "RedisCacheStrategy"
generated: true
---------------

<GenerationInfo sourceFile="packages/core/src/plugin/redis-cache-plugin/redis-cache-strategy.ts" sourceLine="23" packageName="@vendure/core" since="3.1.0" />

A [CacheStrategy](/current/core/reference/typescript-api/cache/cache-strategy#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:

```shell
npm install ioredis@^5.3.2
```

```ts title="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`](/current/core/reference/typescript-api/cache/cache-strategy#cachestrategy)

<div className="members-wrapper">

### init

\<MemberInfo kind="method" type={`() => `}   />

### destroy

\<MemberInfo kind="method" type={`() => `}   />

### get

\<MemberInfo kind="method" type={`(key: string) => Promise<T | undefined>`}   />

### set

\<MemberInfo kind="method" type={`(key: string, value: T, options?: <a href='/current/core/reference/typescript-api/cache/cache-strategy#setcachekeyoptions'>SetCacheKeyOptions</a>) => Promise<void>`}   />

### delete

\<MemberInfo kind="method" type={`(key: string) => Promise<void>`}   />

### invalidateTags

\<MemberInfo kind="method" type={`(tags: string[]) => Promise<void>`}   />

</div>
