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 contains_key method to all cache implementations #110

Merged
merged 7 commits into from
Apr 4, 2022

Conversation

tatsuya6502
Copy link
Member

This PR adds a contains_key method to all cache implementations:

  • sync::Cache
  • sync::SegmentedCache
  • dash::Cache
  • future::Cache
  • unsync::Cache

This method checks if a key is present in the cache. It does not reset the idle timer or update the historic popularity estimator.


Fixes #107

…tting

the idle timer

- Add the `contains_key` method to `sync::Cache`.
…tting

the idle timer

- Add the `contains_key` method to the following cache implementations:
  - `sync::SegmentedCache`
  - `dash::Cache`
  - `future::Cache`
  - `unsync::Cache`
@tatsuya6502 tatsuya6502 self-assigned this Apr 3, 2022
@tatsuya6502 tatsuya6502 added the enhancement New feature or request label Apr 3, 2022
@tatsuya6502 tatsuya6502 added this to the v0.8.1 milestone Apr 3, 2022
For cargo taupaulin, temporary disable some assertions in `drop_many_values`
test in `moka::cht::segment::test` module to avoid a test failure.
Copy link
Member Author

@tatsuya6502 tatsuya6502 left a comment

Choose a reason for hiding this comment

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

Merging.

@tatsuya6502 tatsuya6502 merged commit c4c8a3f into master Apr 4, 2022
@tatsuya6502 tatsuya6502 deleted the contains-key branch April 4, 2022 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check for presence of key
1 participant