From b12830626298b46b4ff5dac79eac6993dbdcba2c Mon Sep 17 00:00:00 2001 From: adrinr Date: Wed, 19 Apr 2023 16:47:48 +0100 Subject: [PATCH] Increase writethrough cache timeout --- packages/backend-core/src/cache/writethrough.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/backend-core/src/cache/writethrough.ts b/packages/backend-core/src/cache/writethrough.ts index a3b1ecc08d..e64c116663 100644 --- a/packages/backend-core/src/cache/writethrough.ts +++ b/packages/backend-core/src/cache/writethrough.ts @@ -47,7 +47,7 @@ async function put( type: LockType.TRY_ONCE, name: LockName.PERSIST_WRITETHROUGH, resource: key, - ttl: 1000, + ttl: 15000, }, async () => { const writeDb = async (toWrite: any) => { @@ -71,6 +71,7 @@ async function put( } } ) + if (!lockResponse.executed) { logWarn(`Ignoring redlock conflict in write-through cache`) }