Skip to content

Commit 9fb72e1

Browse files
committed
chore: adjust debug log prefix as this tag manifest handling will not be specific to response cache handler soon
1 parent 46e5e5b commit 9fb72e1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/run/handlers/tags-handler.cts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,14 @@ export function purgeEdgeCache(tagOrTags: string | string[]): void {
9797
// TODO: add reporting here
9898
getLogger()
9999
.withError(error)
100-
.error(`[NetlifyCacheHandler]: Purging the cache for tags [${tags.join(',')}] failed`)
100+
.error(`[NextRuntime] Purging the cache for tags [${tags.join(',')}] failed`)
101101
})
102102

103103
getRequestContext()?.trackBackgroundWork(purgeCachePromise)
104104
}
105105

106-
async function doRevalidateTag(tags: string[]): Promise<void> {
107-
getLogger().withFields({ tags }).debug('NetlifyCacheHandler.revalidateTag')
106+
async function doRevalidateTagAndPurgeEdgeCache(tags: string[]): Promise<void> {
107+
getLogger().withFields({ tags }).debug('doRevalidateTagAndPurgeEdgeCache')
108108

109109
if (tags.length === 0) {
110110
return
@@ -121,7 +121,7 @@ async function doRevalidateTag(tags: string[]): Promise<void> {
121121
try {
122122
await cacheStore.set(tag, tagManifest, 'tagManifest.set')
123123
} catch (error) {
124-
getLogger().withError(error).log(`Failed to update tag manifest for ${tag}`)
124+
getLogger().withError(error).log(`[NextRuntime] Failed to update tag manifest for ${tag}`)
125125
}
126126
}),
127127
)
@@ -130,14 +130,14 @@ async function doRevalidateTag(tags: string[]): Promise<void> {
130130
// TODO: add reporting here
131131
getLogger()
132132
.withError(error)
133-
.error(`[NetlifyCacheHandler]: Purging the cache for tags ${tags.join(', ')} failed`)
133+
.error(`[NextRuntime]: Purging the cache for tags ${tags.join(', ')} failed`)
134134
})
135135
}
136136

137137
export function markTagsAsStaleAndPurgeEdgeCache(tagOrTags: string | string[]) {
138138
const tags = getCacheTagsFromTagOrTags(tagOrTags)
139139

140-
const revalidateTagPromise = doRevalidateTag(tags)
140+
const revalidateTagPromise = doRevalidateTagAndPurgeEdgeCache(tags)
141141

142142
const requestContext = getRequestContext()
143143
if (requestContext) {

0 commit comments

Comments
 (0)