---
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 <DocsLink href="/reference/typescript-api/cache/cache-strategy#cachestrategy">CacheStrategy</DocsLink> 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: <DocsLink href="/reference/typescript-api/cache/cache-strategy#cachestrategy">`CacheStrategy`</DocsLink>



<div className="members-wrapper">

### constructor

<MemberInfo kind="method" type={`(options: <a href='/reference/typescript-api/cache/redis-cache-plugin#rediscacheplugininitoptions'>RedisCachePluginInitOptions</a>) => RedisCacheStrategy`}   />


### 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='/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>
