From d5b47be2f21fdf4fd49e78d930be453c0574d68b Mon Sep 17 00:00:00 2001 From: Anton Gunnarsson Date: Mon, 17 Mar 2025 16:19:55 +0000 Subject: [PATCH] Merged in fix/handle-cache-delete-without-hit (pull request #1556) Don't return from cache deleteKey * Don't return from cache deleteKey Approved-by: Linus Flood --- .../services/dataCache/DistributedCache/deleteKey.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/scandic-web/services/dataCache/DistributedCache/deleteKey.ts b/apps/scandic-web/services/dataCache/DistributedCache/deleteKey.ts index 30ca1fdbd..25eaa8a18 100644 --- a/apps/scandic-web/services/dataCache/DistributedCache/deleteKey.ts +++ b/apps/scandic-web/services/dataCache/DistributedCache/deleteKey.ts @@ -4,7 +4,7 @@ import { cacheLogger } from "../logger" import { API_KEY } from "./client" import { getCacheEndpoint } from "./endpoints" -export async function deleteKey(key: string, opts?: { fuzzy?: boolean }) { +export async function deleteKey(key: string, opts?: { fuzzy?: boolean }) { const perf = performance.now() const endpoint = getCacheEndpoint(key) @@ -35,9 +35,7 @@ export async function deleteKey(key: string, opts?: { fuzzy?: boolean }) { return undefined } - const data = (await response.json()) as { data: T } cacheLogger.debug( `Delete '${key}' took ${(performance.now() - perf).toFixed(2)}ms` ) - return data.data }