Skip to content

feat: Add ODP LRU Cache - #777

Merged
opti-jnguyen merged 4 commits into
masterfrom
jnguyen/odp-lru-cache
Aug 25, 2022
Merged

feat: Add ODP LRU Cache#777
opti-jnguyen merged 4 commits into
masterfrom
jnguyen/odp-lru-cache

Conversation

@opti-jnguyen

Copy link
Copy Markdown
Contributor

Summary

A generic LRU cache to support efficient caching of the ODP segments results.

Test plan

Added new unit tests files for Client/Server/React Native implementations.

Issues

OASIS-8410

@coveralls

coveralls commented Aug 19, 2022

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.07%) to 96.107% when pulling e7cc31c on jnguyen/odp-lru-cache into da42162 on master.

@opti-jnguyen
opti-jnguyen marked this pull request as ready for review August 19, 2022 15:19
@opti-jnguyen
opti-jnguyen requested a review from a team as a code owner August 19, 2022 15:19
@opti-jnguyen

Copy link
Copy Markdown
Contributor Author

Originally created React Native specific variations for AsyncStorage consideration, but since we're only concerned with an in-memory LRU Cache, will remove LRU Cache code specific to React Native.

@jaeopt jaeopt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! A few small changes suggested.

Comment thread packages/optimizely-sdk/lib/core/odp/lru_cache/LRUCacheElement.ts Outdated
Comment thread packages/optimizely-sdk/lib/core/odp/lru_cache/LRUCache.ts Outdated
Comment thread packages/optimizely-sdk/lib/core/odp/lru_cache/LRUCache.ts Outdated
Comment thread packages/optimizely-sdk/lib/core/odp/lru_cache/LRUCache.ts Outdated
Comment thread packages/optimizely-sdk/lib/core/odp/lru_cache/LRUCache.ts Outdated
@opti-jnguyen
opti-jnguyen requested a review from jaeopt August 24, 2022 21:10

@jaeopt jaeopt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@opti-jnguyen
opti-jnguyen merged commit 7b53fa8 into master Aug 25, 2022
@opti-jnguyen
opti-jnguyen deleted the jnguyen/odp-lru-cache branch August 25, 2022 04:27
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.

4 participants