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

BREAKING CHANGE: hoist the responsibility of sharing local memory cache adapter into application #218

Merged

Conversation

wschurman
Copy link
Member

@wschurman wschurman commented Dec 5, 2023

Why

Closes ENG-6773.

The responsibility of defining the scope of how broadly or narrowly the shared cache should be shared should be the responsibility of the application. This way, the application can decide to share it amongst all requests or just have it be per-request (unlikely, but shouldn't be dictated by library).

Ref: https://github.com/expo/universe/pull/10701#pullrequestreview-1143120207

How

Make localMemoryCacheAdapterMap per-instance of the LocalMemoryCacheAdapterProvider. Applications should create one instance of this provider per shared scope.

Test Plan

Run tests.

Copy link

linear bot commented Dec 5, 2023

@wschurman wschurman requested a review from ide December 5, 2023 23:08
Copy link

codecov bot commented Dec 5, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (ef7b452) 95.46% compared to head (3297d37) 95.46%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #218      +/-   ##
==========================================
- Coverage   95.46%   95.46%   -0.01%     
==========================================
  Files          79       79              
  Lines        2075     2074       -1     
  Branches      258      258              
==========================================
- Hits         1981     1980       -1     
  Misses         93       93              
  Partials        1        1              
Flag Coverage Δ
integration 95.46% <100.00%> (-0.01%) ⬇️
unittest 95.46% <100.00%> (-0.01%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@wschurman wschurman merged commit 9c43a56 into main Dec 6, 2023
3 checks passed
@wschurman wschurman deleted the @wschurman/hoist-shared-local-cache-nature-to-application branch December 6, 2023 20:38
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