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

[SDKS-7498] flagsets cache storage in memory & local storage #246

Merged
merged 3 commits into from
Sep 18, 2023

Conversation

emmaz90
Copy link
Contributor

@emmaz90 emmaz90 commented Sep 15, 2023

Javascript commons library

What did you accomplish?

  • Added Methods to SplitsCacheInMemory & SplitsCacheInLocal to handle flagsets cache:
    • getNamesByFlagsets
    • addToFlagsets
    • removeFromFlagsets
    • removeNames
  • added returnSetsUnion sets utility function

How do we test the changes introduced in this PR?

Unit tests included

Extra Notes

@emmaz90 emmaz90 requested a review from a team as a code owner September 15, 2023 22:45
Copy link
Contributor

@EmilianoSanchez EmilianoSanchez left a comment

Choose a reason for hiding this comment

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

It looks very good Emma. There are some comments, but very simple to update.

@@ -14,3 +14,11 @@ test('__getSetConstructor', () => {
global.Set = originalSet; // restore original global Set

});

test('returnSetsUnion', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Just in case, let's add an edge case here: the union of 2 empty sets should be an empty set.

src/storages/inMemory/SplitsCacheInMemory.ts Outdated Show resolved Hide resolved
src/storages/inMemory/SplitsCacheInMemory.ts Outdated Show resolved Hide resolved
src/storages/inMemory/SplitsCacheInMemory.ts Outdated Show resolved Hide resolved
src/storages/inLocalStorage/SplitsCacheInLocal.ts Outdated Show resolved Hide resolved
src/storages/inLocalStorage/SplitsCacheInLocal.ts Outdated Show resolved Hide resolved
@emmaz90 emmaz90 merged commit 1c8dff6 into sdks-7437 Sep 18, 2023
@emmaz90 emmaz90 deleted the sdks-7498 branch September 18, 2023 20:54
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