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

Refactor to allow adding new field into cache key and/or content #751

Merged
merged 3 commits into from
Sep 25, 2024

Conversation

rayluo
Copy link
Collaborator

@rayluo rayluo commented Sep 23, 2024

Previously the token cache was based on an internal schema. Over the years, we have hardly changed the token's value to store new fields, and we never changed the token's key format for fear of potential token cache miss.

This PR refactors the token cache implementation. After this PR, future addition of new fields will be as simple as two steps:

  1. Update this inline allow-list to store a new field into the token's entry in the cache.
  2. Update this parameter AND that inline allow-list to use the new field as part of the cache key.

This PR is a pure refactoring which does NOT actually change the token key behavior.

@rayluo rayluo requested a review from a team as a code owner September 23, 2024 17:06
@rayluo rayluo changed the title Refactor token cache to also key by key_id Refactor to allow adding new field into cache key and/or content Sep 25, 2024
@rayluo rayluo merged commit 53833ca into dev Sep 25, 2024
12 checks passed
@rayluo rayluo deleted the flexible-cache branch September 25, 2024 23:58
@rayluo rayluo mentioned this pull request Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant