From cfe3515aa616a7f8fbfd4658daa1bb3d827701bd Mon Sep 17 00:00:00 2001 From: Weiko Date: Fri, 15 Nov 2024 00:05:42 +0100 Subject: [PATCH] Set cache metadata version to infinite TTL (#8507) ## Context To avoid having a corrupt metadata version, we want to remove TTL for that key. ## Test Screenshot 2024-11-15 at 00 02 05 --- .../workspace-cache-storage/workspace-cache-storage.service.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/twenty-server/src/engine/workspace-cache-storage/workspace-cache-storage.service.ts b/packages/twenty-server/src/engine/workspace-cache-storage/workspace-cache-storage.service.ts index d549f14c17..dabb3b4676 100644 --- a/packages/twenty-server/src/engine/workspace-cache-storage/workspace-cache-storage.service.ts +++ b/packages/twenty-server/src/engine/workspace-cache-storage/workspace-cache-storage.service.ts @@ -17,6 +17,8 @@ export enum WorkspaceCacheKeys { MetadataVersion = 'metadata:workspace-metadata-version', } +const TTL_INFINITE = 0; + @Injectable() export class WorkspaceCacheStorageService { constructor( @@ -51,6 +53,7 @@ export class WorkspaceCacheStorageService { return this.cacheStorageService.set( `${WorkspaceCacheKeys.MetadataVersion}:${workspaceId}`, metadataVersion, + TTL_INFINITE, ); }