-
Notifications
You must be signed in to change notification settings - Fork 14
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
feat: Incremental Static Build #47
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Preview is readyThis pull request generated a Preview👀 Preview: https://preview-47--gatsby.preview.vtex.app |
Lighthouse ReportsHere are the Lighthouse reports of this Pull Request📝 Based on commit 33138df
|
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.
Great job, my tip, create a constant called max_age with the 2 year value. It will enhance the readability
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.
Looks good!
I tried to simulate but got MISS on every refresh.
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.
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.
LGTM! I was testing in the wrong request.
It works as expected 🎉
What's the purpose of this pull request?
This PR uses the new WebOps capability called Incremental Static Builds. This should drastically improve response times and reduce infrastructure usage on deferred pages, like PDPs and PLPs
How does it work?
WebOps recently released this Incremental Static Builds feature. To use on Gatsby, make sure to return the following cache-control headers on SSR pages:
and enable
USE_STALE_CACHE=true
onvtex.env
.How to test it?
Open a PDP. Check the response header called
x-faststore-cache
. The first request should give you aMISS
. The second request should give youHIT
. Note thatHIT
s are much faster thanMISS
. Also, note that all subsequent requests have a HIT as value.References