pass all the options to the cache constructor

This commit is contained in:
dakkar 2024-06-30 11:08:21 +01:00
parent 8cdea537e9
commit 320db585e3
1 changed files with 1 additions and 0 deletions

View File

@ -40,6 +40,7 @@ export class UrlPreviewService {
this.previewCache = new RedisKVCache<SummalyResult>(this.redisClient, 'summaly', {
lifetime: 1000 * 86400,
memoryCacheLifetime: 1000 * 10 * 60,
fetcher: (key: string) => { throw new Error('the UrlPreview cache should never fetch'); },
toRedisConverter: (value) => JSON.stringify(value),
fromRedisConverter: (value) => JSON.parse(value),
});