Skip to content

Commit a1cfcf3

Browse files
Merge pull request #2575 from rubiin/master
fix: ClientOptions to RedisClientOptions in redis
2 parents 9351555 + 3f7ca63 commit a1cfcf3

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
@@ -226,14 +226,14 @@ class HttpCacheInterceptor extends CacheInterceptor {
226226
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.
227227
228228
```typescript
229-
import type { ClientOpts } from 'redis';
229+
import type { RedisClientOptions } from 'redis';
230230
import * as redisStore from 'cache-manager-redis-store';
231231
import { CacheModule, Module } from '@nestjs/common';
232232
import { AppController } from './app.controller';
233233

234234
@Module({
235235
imports: [
236-
CacheModule.register<ClientOpts>({
236+
CacheModule.register<RedisClientOptions>({
237237
store: redisStore,
238238

239239
// Store-specific configuration:

0 commit comments

Comments
 (0)