Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 782a106

Browse filesBrowse files
committed
Merge remote-tracking branch 'origin/main' into fix/noop-empty-revalidate-tags
2 parents d0a7f47 + 871f7b9 commit 782a106
Copy full SHA for 782a106

File tree

Expand file treeCollapse file tree

3 files changed

+16
-38
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+16
-38
lines changed

‎package-lock.json

Copy file name to clipboardExpand all lines: package-lock.json
+10-35Lines changed: 10 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

Copy file name to clipboardExpand all lines: package.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"@netlify/edge-bundler": "^12.2.3",
5555
"@netlify/edge-functions": "^2.11.0",
5656
"@netlify/eslint-config-node": "^7.0.1",
57-
"@netlify/functions": "^2.8.2",
57+
"@netlify/functions": "^3.0.0",
5858
"@netlify/serverless-functions-api": "^1.30.1",
5959
"@netlify/zip-it-and-ship-it": "^9.41.0",
6060
"@opentelemetry/api": "^1.8.0",

‎src/run/handlers/cache.cts

Copy file name to clipboardExpand all lines: src/run/handlers/cache.cts
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { type Span } from '@opentelemetry/api'
1111
import type { PrerenderManifest } from 'next/dist/build/index.js'
1212
import { NEXT_CACHE_TAGS_HEADER } from 'next/dist/lib/constants.js'
1313

14+
import { name as nextRuntimePkgName, version as nextRuntimePkgVersion } from '../../../package.json'
1415
import {
1516
type CacheHandlerContext,
1617
type CacheHandlerForMultipleVersions,
@@ -30,6 +31,8 @@ type TagManifest = { revalidatedAt: number }
3031

3132
type TagManifestBlobCache = Record<string, Promise<TagManifest>>
3233

34+
const purgeCacheUserAgent = `${nextRuntimePkgName}@${nextRuntimePkgVersion}`
35+
3336
export class NetlifyCacheHandler implements CacheHandlerForMultipleVersions {
3437
options: CacheHandlerContext
3538
revalidatedTags: string[]
@@ -353,7 +356,7 @@ export class NetlifyCacheHandler implements CacheHandlerForMultipleVersions {
353356

354357
getLogger().debug(`Purging CDN cache for: [${tag}]`)
355358
requestContext.trackBackgroundWork(
356-
purgeCache({ tags }).catch((error) => {
359+
purgeCache({ tags, userAgent: purgeCacheUserAgent }).catch((error) => {
357360
// TODO: add reporting here
358361
getLogger()
359362
.withError(error)
@@ -403,7 +406,7 @@ export class NetlifyCacheHandler implements CacheHandlerForMultipleVersions {
403406
}),
404407
)
405408

406-
await purgeCache({ tags }).catch((error) => {
409+
await purgeCache({ tags, userAgent: purgeCacheUserAgent }).catch((error) => {
407410
// TODO: add reporting here
408411
getLogger()
409412
.withError(error)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.