-
Notifications
You must be signed in to change notification settings - Fork 101
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(cow-fi): cache data and pages #5169
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎ This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
5dcaead
to
c11cfe8
Compare
Report too large to display inline |
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.
Works!
Summary
Before I got to this solution, I did the refactoring from pages to app router: #5167. It also has a value, but in order to stop spending money in Vercel I decided to extract this fix as a hotfix.
Changes
DATA_CACHE_TIME_SECONDS
from 5 min to 1 hourCache-Control
header fro all pages (600 seconds)react-inlinesvg
cacheCMS
requestsfetch()
requestsNow in Vercel we see that cache is working:
To Test
cache-control: public, s-maxage=60, stale-while-revalidate=600
header in response.svg
files. After the page reloading there should not be so many.svg
requests