-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Update caching strategy to allow for greater cache use (#404)
Instead of indexing by the full context's hash, we are going to revert to indexing by canonical key. The cache will store the hash alongside the flag values. This stored hash will be compared with the active context hash when the cache is read. If the hashes are different, the SDK will fetch updated values. If they haven't changed, then the SDK is free to wait until the cache freshness has exceeded the configured polling interval. As a result, the SDK should have a smoother transition from default -> last known values -> fresh values as the context changes while also minimizing unnecessary API requests.
- Loading branch information
Showing
7 changed files
with
126 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.