Skip to content
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: Cache api schema for build #9126

Merged
merged 2 commits into from
Feb 13, 2024
Merged

feat: Cache api schema for build #9126

merged 2 commits into from
Feb 13, 2024

Conversation

HazAT
Copy link
Member

@HazAT HazAT commented Feb 13, 2024

Vercel build was error because we make a request for every page we generate, this add a simple cache.

Copy link

vercel bot commented Feb 13, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sentry-docs 🛑 Canceled (Inspect) Feb 13, 2024 11:45am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
sentry-docs-next ⬜️ Ignored (Inspect) Visit Preview Feb 13, 2024 11:45am

@lforst
Copy link
Member

lforst commented Feb 13, 2024

You may wanna use react's cache() fn for this. Don't know if it works for static things like that tho.

@HazAT
Copy link
Member Author

HazAT commented Feb 13, 2024

@lforst too fancy, merging now

@HazAT HazAT merged commit 680c7c4 into master Feb 13, 2024
9 of 10 checks passed
@HazAT HazAT deleted the cache-api-schema branch February 13, 2024 11:44
@vercel vercel bot temporarily deployed to Preview – sentry-docs February 13, 2024 11:45 Inactive
@mjq-sentry
Copy link

You may wanna use react's cache() fn for this. Don't know if it works for static things like that tho.

Actually the exported method that calls this function (apiCategories) already uses react's cache as of #9069, so tbh I'm really surprised this was still making a request per page 🤔

@lforst
Copy link
Member

lforst commented Feb 13, 2024

The build logs mention something about something not being able to be cached bc the data is >2MB. Maybe it's not caching it because of that - which would be weird because especially in cases where the data is big, I want it cached. 🤔

mjq-sentry pushed a commit that referenced this pull request Feb 15, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants