From 811776930c4e3598c9dcebed1c27b5c2217030ae Mon Sep 17 00:00:00 2001 From: Ou Date: Thu, 24 Oct 2024 00:35:50 +0800 Subject: [PATCH] fix: cloudflare cache --- server/hooks/useCache.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/hooks/useCache.ts b/server/hooks/useCache.ts index 89b6634..290546f 100644 --- a/server/hooks/useCache.ts +++ b/server/hooks/useCache.ts @@ -4,7 +4,7 @@ import { Cache } from "#/database/cache" export function useCache() { try { const db = useDatabase() - if (process.env.CF_PAGES_BRANCH && process.env.CF_PAGES_BRANCH !== "production") return + if (process.env.CF_PAGES_BRANCH && process.env.CF_PAGES_BRANCH !== "main") return if (process.env.NODE_ENV && process.env.NODE_ENV !== "production") return if (db) return new Cache(db) } catch (e) {