Skip to content

Commit 46e5e5b

Browse files
committed
chore: move cache purging debug log to avoid logging when no tags are to be purged
1 parent 6dece23 commit 46e5e5b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/run/handlers/cache.cts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,8 +424,6 @@ export class NetlifyCacheHandler implements CacheHandlerForMultipleVersions {
424424
// encode here to deal with non ASCII characters in the key
425425
const tag = `_N_T_${key === '/index' ? '/' : encodeURI(key)}`
426426

427-
getLogger().debug(`Purging CDN cache for: [${tag}]`)
428-
429427
purgeEdgeCache(tag)
430428
}
431429
}

src/run/handlers/tags-handler.cts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ export function purgeEdgeCache(tagOrTags: string | string[]): void {
9191
return
9292
}
9393

94+
getLogger().debug(`[NextRuntime] Purging CDN cache for: [${tags}.join(', ')]`)
95+
9496
const purgeCachePromise = purgeCache({ tags, userAgent: purgeCacheUserAgent }).catch((error) => {
9597
// TODO: add reporting here
9698
getLogger()

0 commit comments

Comments
 (0)