Store icon indicating copy to clipboard operation
Store copied to clipboard

Add Cache.getAllPresent()

Open BoD opened this issue 1 year ago • 1 comments

Description

Adds getAllPresent() with no argument to Cache, in addition to existing getAllPresent(keys: List<*>). In the original Guava library there was an asMap() method which could be used to get the contents of the cache.

Type of Change

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] This change requires a documentation update

Test Plan

Removed @Ignore from the getAllPresent() test.

Checklist:

Before submitting your PR, please review and check all of the following:

  • [x] I have performed a self-review of my own code
  • [x] I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation (N/A)
  • [x] My changes generate no new warnings
  • [x] I have added tests that prove my change is effective
  • [x] New and existing unit tests pass locally with my changes

Additional Notes:

Used clear() as an inspiration for the implementation.

BoD avatar Feb 28 '24 15:02 BoD

Please document the default method, otherwise LGTM and I will be around to stamp. I see the other tickets - when do you need a release?

🙏 I've addressed the comments 👍

A release is not urgent, for now we've bundled the classes in the project - whenever you make a release, we'll use the dependency instead.

BoD avatar Mar 18 '24 11:03 BoD