-
Notifications
You must be signed in to change notification settings - Fork 83
[FSSDK-11505] update cache interface #1051
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the cache interface to be consistent with other SDKs by renaming and refactoring cache-related types and methods. Key changes include replacing “Cache” with “Store” and updating method names (e.g. get → lookup, set → save, clear → reset) across the codebase and tests.
Reviewed Changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
lib/utils/cache/store.ts | Introduces new cache interfaces (OpStore) and updated implementations with batched getters. |
lib/utils/cache/store.spec.ts | Updates test cases to use the new SyncPrefixStore and AsyncPrefixStore. |
lib/utils/cache/local_storage_cache.browser.ts | Changes implementation to adopt SyncStore. |
lib/utils/cache/in_memory_lru_cache.ts | Renames methods (get→lookup, set→save, clear→reset) and removes getBatched implementation. |
lib/utils/cache/in_memory_lru_cache.spec.ts | Updates tests to match the new method names and behavior. |
lib/utils/cache/cache.ts | Refactors the cache API to use OpCache and related types. |
lib/utils/cache/async_storage_cache.react_native.ts | Adapts cache implementation to use AsyncStore. |
lib/tests/mock/mock_cache.ts | Updates mock implementations with new Store interface methods. |
lib/project_config/, lib/odp/segment_manager/, and others | Adjust code to import and use the new Store interfaces and method names. |
lib/event_processor/* and related test/spec files | Replace PrefixCache references with PrefixStore and update method calls. |
lib/core/decision_service/cmab/cmab_service.ts | Updates cache operations (clear→reset, get→lookup, set→save) for CMAB caching. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Please update the copyright years in mentioned files.
lib/event_processor/event_processor_factory.react_native.spec.ts
Outdated
Show resolved
Hide resolved
c1c6161
to
0b868f5
Compare
Summary
Test plan
Issues