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

fix: caching of user and bucketed config #985

Merged
merged 1 commit into from
Oct 24, 2024
Merged

fix: caching of user and bucketed config #985

merged 1 commit into from
Oct 24, 2024

Conversation

ajwootto
Copy link
Contributor

  • wrap the construction of the DVCPopulatedUser in a per-request cache so that it doesn't recreate from scratch on each call to useVariableValue
  • this also makes sure we're using the same timestamps for the user across the request
  • caching this means that caching the bucketed config result now works as intended
  • wrap the call to the SDK API in a cache as well, because the fetch call is being treated as "not cacheable" by Next for some reason

Copy link

vercel bot commented Oct 24, 2024

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

Name Status Preview Comments Updated (UTC)
js-sdks-web-elements ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 24, 2024 10:29pm
js-sdks-with-provider ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 24, 2024 10:29pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
js-sdks-next-js-page-router ⬜️ Ignored (Inspect) Oct 24, 2024 10:29pm

@ajwootto ajwootto changed the title fix caching of user and bucketed config fix: caching of user and bucketed config Oct 24, 2024
@ajwootto ajwootto enabled auto-merge (squash) October 24, 2024 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants