Cache miss in cloudfront, whats the correct NextJS setup? #67414
Unanswered
simpel
asked this question in
App Router
Replies: 1 comment
-
|
Have you tried adding revalidate to your export const dynamic = 'force-static';
export const revalidate = 2592000;More insights here. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
We just released a new nextJS site and for every request we get at cache miss from cloudfront. We havn't really done anything to the headers being sent on the NextJS side. We just assumed things would work nice I guess. So any guidance on how to get the cloudfront cache to hit instead of miss? We compared our headers to the ones from nextjs.org and they're identical.
Is adding max-age really the way to go? Won't that disable the revalidation stuff? We currently have a revalidation endpoint that gets hit on every update in the CMS
This is what we get now:
Beta Was this translation helpful? Give feedback.
All reactions