mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2025-01-03 14:11:06 +00:00
pass all the options to the cache constructor
This commit is contained in:
parent
8cdea537e9
commit
320db585e3
1 changed files with 1 additions and 0 deletions
|
@ -40,6 +40,7 @@ export class UrlPreviewService {
|
||||||
this.previewCache = new RedisKVCache<SummalyResult>(this.redisClient, 'summaly', {
|
this.previewCache = new RedisKVCache<SummalyResult>(this.redisClient, 'summaly', {
|
||||||
lifetime: 1000 * 86400,
|
lifetime: 1000 * 86400,
|
||||||
memoryCacheLifetime: 1000 * 10 * 60,
|
memoryCacheLifetime: 1000 * 10 * 60,
|
||||||
|
fetcher: (key: string) => { throw new Error('the UrlPreview cache should never fetch'); },
|
||||||
toRedisConverter: (value) => JSON.stringify(value),
|
toRedisConverter: (value) => JSON.stringify(value),
|
||||||
fromRedisConverter: (value) => JSON.parse(value),
|
fromRedisConverter: (value) => JSON.parse(value),
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue