Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[🐛 Bug]: next/cache: Handle changed type signature of Next.js 13.5+ #556

Closed
susemeee opened this issue Nov 22, 2023 · 2 comments · Fixed by #557
Closed

[🐛 Bug]: next/cache: Handle changed type signature of Next.js 13.5+ #556

susemeee opened this issue Nov 22, 2023 · 2 comments · Fixed by #557

Comments

@susemeee
Copy link
Contributor

          > Hello! I have been debugging `revalidateTag` inconsistency and found out some breaking changes of upstream.

Internal cache handling behavior of Next.js seems to be changed starting from version 13.5 and above. IncrementalCacheValue no longer provides tags attribute, results in inability of flushing cache with tags. (despite revalidate code works fine)

looks like the type signature changed in next.js :(

https://github.com/vercel/next.js/blob/canary/packages/next/src/server/response-cache/types.ts

would you be able to open a new issue for this @susemeee? i recall on your other issue you ticked the box that you'd be interested in helping fix the bug. would you like to give this issue a go? if not, just lmk and i'll be happy to look into a fix

Originally posted by @james-elicx in #451 (comment)

@susemeee
Copy link
Contributor Author

In request headers there is x-vercel-cache-tags property exists, and I think it is okay to use it if original property is missing.

@james-elicx Could you check if it's safe to use? If so, I will make a PR with the fix.

@james-elicx
Copy link
Contributor

In request headers there is x-vercel-cache-tags property exists, and I think it is okay to use it if original property is missing.

Ah yeah, I remember that header from when I first did the cache, and ended up going with the property instead because, well, it was on the object.

Sounds good to me, falling back to the header makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants