Revalidate booking pages on updateProfile#7941
Conversation
CAL-1319 Revalidate booking pages (ISR) when personal/general settings was updated
Use on demand revalidation |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
📦 Next.js Bundle AnalysisThis analysis was generated by the next.js bundle analysis action 🤖 🎉 Global Bundle Size Decreased
DetailsThe global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster. Any third party scripts you have added directly to your app using the If you want further insight into what is behind the changes, give @next/bundle-analyzer a try! Fifty-nine Pages Changed SizeThe following pages changed size from the code in this PR compared to its base branch:
DetailsOnly the gzipped size is provided here based on an expert tip. First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If Any third party scripts you have added directly to your app using the The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored. |
emrysal
left a comment
There was a problem hiding this comment.
Looks good to me, am wondering how this will integrate with the new booker in the bigger picture.
| }, | ||
| }); | ||
| // waiting for this isn't needed | ||
| Promise.all(eventTypes.map((eventType) => res?.revalidate(`/${ctx.user.username}/${eventType.slug}`))) |
There was a problem hiding this comment.
This can take some time theoretically. Is it possible that the serverless function stops execution midway because the response has already been sent?
Maybe we should have a before and after log to track that this works successfully everytime(I see an "after" log, we can just add a "before" log)
Also, we can have a whitelist of changes that impact booking pages to probably avoid, unnecessary revalidate calls in the system e.g. Password, session timeout and others' don't impact booking pages.
What does this PR do?
Revalidate booking page cache when the user change personal or general settings
Fixes #7892
Environment: Staging(main branch) / Production
Type of change
How should this be tested?