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

feat: composed cache adapter, composed secondary cache, local memory secondary cache #164

Merged
merged 2 commits into from
Mar 10, 2022

Conversation

wschurman
Copy link
Member

Why

This PR imports some features from Expo's internal testing ground:

  • ComposedCacheAdapter - a cache adapter that composes other cache adapters
  • ComposedSecondaryCache - a secondary cache that composes other secondary caches
  • LocalMemorySecondaryCache - a LRUCache secondary cache (uses local memory stuff from feat: add local memory cache package  #158)

How

Add features and tests.

Test Plan

Wait for CI.

@wschurman wschurman requested a review from quinlanj March 10, 2022 01:57
@codecov
Copy link

codecov bot commented Mar 10, 2022

Codecov Report

Merging #164 (7a0a33a) into master (bc378b6) will increase coverage by 0.10%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #164      +/-   ##
==========================================
+ Coverage   95.98%   96.09%   +0.10%     
==========================================
  Files          77       80       +3     
  Lines        1918     1970      +52     
  Branches      208      210       +2     
==========================================
+ Hits         1841     1893      +52     
  Misses         76       76              
  Partials        1        1              
Flag Coverage Δ
integration 96.09% <100.00%> (+0.10%) ⬆️
unittest 96.09% <100.00%> (+0.10%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ndary-cache-redis/src/RedisSecondaryEntityCache.ts 100.00% <ø> (ø)
...ocal-memory/src/LocalMemoryCacheAdapterProvider.ts 100.00% <100.00%> (ø)
...ocal-memory/src/LocalMemorySecondaryEntityCache.ts 100.00% <100.00%> (ø)
packages/entity/src/ComposedEntityCacheAdapter.ts 100.00% <100.00%> (ø)
...ackages/entity/src/ComposedSecondaryEntityCache.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bc378b6...7a0a33a. Read the comment docs.

Copy link
Member

@quinlanj quinlanj left a comment

Choose a reason for hiding this comment

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

thank you!

@wschurman wschurman merged commit 6b6e70e into master Mar 10, 2022
@wschurman wschurman deleted the @wschurman/move-over-composed-cache-stuff branch March 10, 2022 22:42
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.

2 participants