From 51db573030ecc79c4ba14d250908de9a38a64c35 Mon Sep 17 00:00:00 2001 From: JannikStreek Date: Thu, 26 May 2022 13:41:51 +0200 Subject: [PATCH] add 30 days ttl --- src/storage/storage.service.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/storage/storage.service.ts b/src/storage/storage.service.ts index 6201d1e..09466cd 100644 --- a/src/storage/storage.service.ts +++ b/src/storage/storage.service.ts @@ -8,6 +8,7 @@ export class StorageService { constructor() { const uri = process.env[`STORAGE_URI`]; + const ttl = 2592000; // 30 days if (!uri) { this.logger.warn( `STORAGE_URI is undefined, will use non persistant in memory storage`, @@ -18,6 +19,7 @@ export class StorageService { const keyv = new Keyv({ uri, namespace, + ttl, }); keyv.on('error', (err) => this.logger.error(`Connection Error for namespace ${namespace}`, err),