Skip to content

Commit

Permalink
cache debug hopefully not needed anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
Aprillion committed Sep 16, 2023
1 parent 0761480 commit ba69b10
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions app/server-utils/kv-cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ export function withCache<Fn extends (...args: string[]) => Promise<any>>(

export async function reloadInBackgroundIfNeeded(url: string, timestamp: string) {
const ageInMilliseconds = new Date().getTime() - new Date(timestamp).getTime()
// TODO: #228 keep debug for a few day after fixing cache invalidation, can be deleted later
console.debug('Reload needed', ageInMilliseconds > 10 * 60 * 1000, url || '/', timestamp)
if (ageInMilliseconds > 10 * 60 * 1000) {
const text = await (await fetch(`${url}${url.includes('?') ? '&' : '?'}reload`)).text()
try {
Expand Down

0 comments on commit ba69b10

Please sign in to comment.