Skip to content

Commit 63ccaaf

Browse files
authored
fix(techniques): caching (better alternative)
1 parent d6791ac commit 63ccaaf

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
@@ -236,7 +236,7 @@ With this in place, you can register the `CacheModule` with multiple stores as s
236236
import { Module } from '@nestjs/common';
237237
import { CacheModule, CacheStore } from '@nestjs/cache-manager';
238238
import { AppController } from './app.controller';
239-
import KeyvRedis from '@keyv/redis';
239+
import { createKeyv } from '@keyv/redis';
240240
import { Keyv } from 'keyv';
241241
import { CacheableMemory } from 'cacheable';
242242

@@ -249,7 +249,7 @@ import { CacheableMemory } from 'cacheable';
249249
new Keyv({
250250
store: new CacheableMemory({ ttl: 60000, lruSize: 5000 }),
251251
}),
252-
new Keyv(new KeyvRedis('redis://localhost:6379')),
252+
createKeyv('redis://localhost:6379'),
253253
],
254254
};
255255
},

0 commit comments

Comments
 (0)