From 59777af9b7fade0b125e40be215857e0f2c3be78 Mon Sep 17 00:00:00 2001 From: guitavano Date: Mon, 3 Mar 2025 16:23:07 -0300 Subject: [PATCH] add no-cache to secrets --- website/loaders/secret.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/website/loaders/secret.ts b/website/loaders/secret.ts index 7836aee96..e601a74b6 100644 --- a/website/loaders/secret.ts +++ b/website/loaders/secret.ts @@ -25,7 +25,7 @@ export interface Props { */ name?: string; } -const cache: Record> = {}; + const showWarningOnce = once(() => { console.warn( colors.brightYellow( @@ -47,7 +47,7 @@ const getSecret = async (props: Props): Promise => { await showWarningOnce(); return Promise.resolve(null); } - return cache[encrypted] ??= decryptFromHex(encrypted).then((d) => d.decrypted) + return decryptFromHex(encrypted).then((d) => d.decrypted) .catch((err) => { const prettyName = name ? colors.brightRed(name) : "anonymous secret"; console.error( @@ -67,3 +67,5 @@ export default async function Secret(props: Props): Promise { }, }; } + +export const cache = "no-cache"; \ No newline at end of file