-
Notifications
You must be signed in to change notification settings - Fork 13
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
[Issue #2622] Update opp page for ISR #2724
Conversation
92c53ac
to
12aab7f
Compare
af3ed1d
to
060650e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -41,6 +42,10 @@ export async function generateMetadata({ params }: { params: { id: string } }) { | |||
return meta; | |||
} | |||
|
|||
export function generateStaticParams() { | |||
return []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok so this seems to be the configuration that this change sets up:
- no pages are built and pre-cached at build time
- all pages are rendered the on their first hit within a 10 minute window, then cached for 10 minutes
Is that right? Is the idea to try this out and evaluate how it works, or are there plans for next steps, such as as generating a list of all current opportunities at build time and pre-caching? Is the 10 minute window a ballpark estimate at this point that we will analyze in some way after launch and adjust, or is that based on data that leads us to believe it should be a pretty solid permanent setting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that right? Is the idea to try this out and evaluate how it works, or are there plans for next steps, such as as generating a list of all current opportunities at build time and pre-caching?
Yes. We could certainly to that in the future. We don't have a good way of getting all of the opp ids. We might want an API for that in the future.
Is the 10 minute window a ballpark estimate at this point that we will analyze in some way after launch and adjust, or is that based on data that leads us to believe it should be a pretty solid permanent setting?
The file links refresh every 30 mins, so that is the higher end. The 10 mins is something we can test and adjust in the future.
@@ -127,5 +136,3 @@ async function OpportunityListing({ params }: { params: { id: string } }) { | |||
</div> | |||
); | |||
} | |||
|
|||
export default withFeatureFlag(OpportunityListing, "showSearchV0"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when we merge, worth noting in the commit that this change is also included in case anyone wants to track it down later
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ ✅ ✅ ✅
Summary
Fixes #2622
Time to review: 5 mins
Changes proposed
Add ISR for opp pages.
Testing locally
npm run build && npm run start