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

Add support for Keys() to Memory Driver #1053

Merged
merged 3 commits into from
Nov 5, 2023
Merged

Add support for Keys() to Memory Driver #1053

merged 3 commits into from
Nov 5, 2023

Conversation

gaby
Copy link
Member

@gaby gaby commented Oct 30, 2023

  • Added Keys() method
  • Fixed the expiration test which was checking for the key in a separate test
  • Removed the global testStore, each test now creates a testStore.
  • Added calls to Keys() to all tests.
  • Updated Readme

Second Part fix for #995
First part #1052

@gaby
Copy link
Member Author

gaby commented Oct 30, 2023

Did I find a bug in the Memory storage? Why are there values in Keys if they have been deleted/expired?

@gaby
Copy link
Member Author

gaby commented Oct 30, 2023

Seems like Get() is faking the missing key, and the GC hasn't run yet. So when using Keys() the values are actually still in memory.

@gaby
Copy link
Member Author

gaby commented Oct 30, 2023

Done, added expiration check to Keys() and a new unit-test to call Keys() during a long expiration.

@ReneWerner87 ReneWerner87 merged commit b6cf405 into main Nov 5, 2023
12 checks passed
@gaby gaby deleted the memory-keys branch November 5, 2023 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants