From 9704aca1eee70bf7f1d79a371a764cd621e6bdcd Mon Sep 17 00:00:00 2001 From: shaokeyibb Date: Wed, 17 Jul 2024 19:19:08 +0800 Subject: [PATCH] refactor: disable cache (for now) --- cloudflare-workers/src/cache.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cloudflare-workers/src/cache.ts b/cloudflare-workers/src/cache.ts index 39a67f9b..7c60be17 100644 --- a/cloudflare-workers/src/cache.ts +++ b/cloudflare-workers/src/cache.ts @@ -11,13 +11,14 @@ export async function purgeAllCommentCache(env: Env, cache: Cache, baseUrl: stri } export async function purgeCommentCache(env: Env, cache: Cache, baseUrl: string, path: string) { - await cache.delete(`${baseUrl}/comment${path}`); + // await cache.delete(`${baseUrl}/comment${path}`); } export async function putCommentCache(env: Env, cache: Cache, baseUrl: string, path: string, resp: Response): Promise { - await cache.put(`${baseUrl}/comment${path}`, resp); + // await cache.put(`${baseUrl}/comment${path}`, resp); } export async function matchCommentCache(env: Env, cache: Cache, baseUrl: string, path: string): Promise { - return await cache.match(`${baseUrl}/comment${path}`); + // return await cache.match(`${baseUrl}/comment${path}`); + return undefined; }