Skip to content

Conversation

@Tehhs
Copy link

@Tehhs Tehhs commented Oct 11, 2025

PR should hopefully address #17

Changes

  • Adds ContainsOrAdd(key, value) (contains, evicted) in an attempt to match hashicorps ContainsOrAdd function
  • Adds similar function ContainsOrSet(key, value, ttl) (contains) to V1 & V2 as they don't really have a concept of "Add" which returns a boolean if evicted like V3. Not sure about this part, let me know.
  • Unit tests

Testing

All unit tests pass in V1, V2 & V3.

@Tehhs Tehhs marked this pull request as ready for review October 11, 2025 01:27
@Tehhs Tehhs requested a review from umputun as a code owner October 11, 2025 01:27
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.

1 participant