Skip to content

Commit

Permalink
refactor: disable cache (for now)
Browse files Browse the repository at this point in the history
  • Loading branch information
shaokeyibb committed Jul 17, 2024
1 parent 689e921 commit 9704aca
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cloudflare-workers/src/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<void> {
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<Response | undefined> {
return await cache.match(`${baseUrl}/comment${path}`);
// return await cache.match(`${baseUrl}/comment${path}`);
return undefined;
}

0 comments on commit 9704aca

Please sign in to comment.