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

chore: refactor cachers to use an abstract class and interface #157

Merged
merged 3 commits into from
Feb 15, 2022

Conversation

quinlanj
Copy link
Member

@quinlanj quinlanj commented Feb 13, 2022

Why

Interfaces and abstract classes for generic cachers and secondary entity caches. Followup from https://github.com/expo/universe/pull/9106#pullrequestreview-879787342

The plan is to have:

  • GenericRedisCacher (from the entity package) and GenericLocalMemoryCacher implement GenericCacher?
  • SecondaryRedisEntityCache (from the entity package) and LocalMemoryAndRedisSecondaryEntityCache extending GenericSecondaryEntityCache?

Test Plan

  • current tests pass

@codecov
Copy link

codecov bot commented Feb 14, 2022

Codecov Report

Merging #157 (40194f3) into master (0adcf72) will decrease coverage by 0.07%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #157      +/-   ##
==========================================
- Coverage   95.92%   95.85%   -0.08%     
==========================================
  Files          74       74              
  Lines        1866     1833      -33     
  Branches      204      201       -3     
==========================================
- Hits         1790     1757      -33     
  Misses         75       75              
  Partials        1        1              
Flag Coverage Δ
integration 95.85% <100.00%> (-0.08%) ⬇️
unittest 95.85% <100.00%> (-0.08%) ⬇️

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

Impacted Files Coverage Δ
...tity-cache-adapter-redis/src/GenericRedisCacher.ts 100.00% <100.00%> (ø)
...ndary-cache-redis/src/RedisSecondaryEntityCache.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 0adcf72...40194f3. Read the comment docs.

@wschurman
Copy link
Member

(codecov looks fine btw)

@quinlanj quinlanj merged commit 09d48a6 into master Feb 15, 2022
@quinlanj quinlanj deleted the @quin/cacheMania branch February 15, 2022 02: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