Skip to content

Commit 16ec7d3

Browse files
authored
[backport] Increase max cache tags to 128 (#73125)
1 parent 0491c2a commit 16ec7d3

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

packages/next/src/lib/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export const NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER =
2121

2222
// if these change make sure we update the related
2323
// documentation as well
24-
export const NEXT_CACHE_TAG_MAX_ITEMS = 64
24+
export const NEXT_CACHE_TAG_MAX_ITEMS = 128
2525
export const NEXT_CACHE_TAG_MAX_LENGTH = 256
2626
export const NEXT_CACHE_SOFT_TAG_MAX_LENGTH = 1024
2727
export const NEXT_CACHE_IMPLICIT_TAG_ID = '_N_T_'

test/e2e/app-dir/app-static/app-static.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ describe('app-dir static/dynamic handling', () => {
6464
expect(res.status).toBe(200)
6565
await retry(() => {
6666
expect(next.cliOutput).toContain('exceeded max tag count for')
67-
expect(next.cliOutput).toContain('tag-65')
67+
expect(next.cliOutput).toContain('tag-129')
6868
})
6969
})
7070

test/e2e/app-dir/app-static/app/too-many-cache-tags/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ export const revalidate = 0
33
export default async function Page() {
44
const tags: string[] = []
55

6-
for (let i = 0; i < 96; i++) {
6+
for (let i = 0; i < 130; i++) {
77
tags.push(`tag-${i}`)
88
}
99
const data = await fetch(

0 commit comments

Comments
 (0)