Skip to content

Commit

Permalink
[backport] Increase max cache tags to 128 (#73125)
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk authored Nov 25, 2024
1 parent 0491c2a commit 16ec7d3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/next/src/lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER =

// if these change make sure we update the related
// documentation as well
export const NEXT_CACHE_TAG_MAX_ITEMS = 64
export const NEXT_CACHE_TAG_MAX_ITEMS = 128
export const NEXT_CACHE_TAG_MAX_LENGTH = 256
export const NEXT_CACHE_SOFT_TAG_MAX_LENGTH = 1024
export const NEXT_CACHE_IMPLICIT_TAG_ID = '_N_T_'
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/app-dir/app-static/app-static.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ describe('app-dir static/dynamic handling', () => {
expect(res.status).toBe(200)
await retry(() => {
expect(next.cliOutput).toContain('exceeded max tag count for')
expect(next.cliOutput).toContain('tag-65')
expect(next.cliOutput).toContain('tag-129')
})
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export const revalidate = 0
export default async function Page() {
const tags: string[] = []

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

0 comments on commit 16ec7d3

Please sign in to comment.