Skip to content

Commit 24d9f13

Browse files
authored
fix: ClientOptions to RedisClientOptions in redis
1 parent 90d1519 commit 24d9f13

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

content/techniques/caching.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,14 +219,14 @@ class HttpCacheInterceptor extends CacheInterceptor {
219219
This service takes advantage of [cache-manager](https://github.com/node-cache-manager/node-cache-manager) under the hood. The `cache-manager` package supports a wide-range of useful stores, for example, [Redis store](https://github.com/dabroek/node-cache-manager-redis-store). A full list of supported stores is available [here](https://github.com/node-cache-manager/node-cache-manager#store-engines). To set up the Redis store, simply pass the package together with corresponding options to the `register()` method.
220220
221221
```typescript
222-
import type { ClientOpts } from 'redis';
222+
import type { RedisClientOptions } from 'redis';
223223
import * as redisStore from 'cache-manager-redis-store';
224224
import { CacheModule, Module } from '@nestjs/common';
225225
import { AppController } from './app.controller';
226226

227227
@Module({
228228
imports: [
229-
CacheModule.register<ClientOpts>({
229+
CacheModule.register<RedisClientOptions>({
230230
store: redisStore,
231231

232232
// Store-specific configuration:

0 commit comments

Comments
 (0)