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

chore: reuse subscription library cache in quota library to reduce cross region HTTP requests #7109

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

darcyYe
Copy link
Contributor

@darcyYe darcyYe commented Mar 6, 2025

Summary

Reuse subscription library cache in quota library to reduce cross region HTTP requests, resolves LOG-10881
Before this change, quota library relies on Logto Cloud service for checking whether some specific resources can be added. On our product environment, these kind of HTTP requests are in cross-region manner (e.g. request server locates in EU from AU/US regions, which are time-consuming). Since we now have subscription data cached in each region, the access to cached subscription data in the same region saves time and without affect existing logics.

Testing

N/A, only code refactor.

Checklist

  • .changeset
  • unit tests
  • integration tests
  • necessary TSDoc comments

Copy link

github-actions bot commented Mar 6, 2025

COMPARE TO master

Total Size Diff 📈 +185 Bytes

Diff by File
Name Diff
packages/core/src/libraries/quota.ts 📈 +137 Bytes
packages/core/src/tenants/Libraries.ts 📈 +150 Bytes
packages/core/src/tenants/Tenant.ts 📈 +50 Bytes
packages/core/src/test-utils/tenant.ts 📈 +25 Bytes
packages/core/src/utils/subscription/index.ts 📈 +177 Bytes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

1 participant