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 ReplaceKey method #38

Merged
merged 2 commits into from
May 2, 2023
Merged

Add ReplaceKey method #38

merged 2 commits into from
May 2, 2023

Conversation

erni27
Copy link
Owner

@erni27 erni27 commented May 1, 2023

This PR adds ReplaceKey method.

The new method is introduced for both Cache and Sharded types. It replaces the given key with the new key. The value remains the same. It returns true if the key is present and replaced, otherwise it returns false. If there is an existing entry for the new key, it is replaced.

@codecov-commenter
Copy link

Codecov Report

Merging #38 (0873bb1) into master (b1f3d7b) will decrease coverage by 2.35%.
The diff coverage is 88.42%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##           master      #38      +/-   ##
==========================================
- Coverage   95.34%   93.00%   -2.35%     
==========================================
  Files           8        8              
  Lines         602      715     +113     
==========================================
+ Hits          574      665      +91     
- Misses         24       45      +21     
- Partials        4        5       +1     
Impacted Files Coverage Δ
eviction.go 65.30% <0.00%> (-2.78%) ⬇️
imcache.go 95.22% <89.36%> (-3.40%) ⬇️

@erni27 erni27 marked this pull request as ready for review May 2, 2023 20:46
@erni27 erni27 merged commit 8231e75 into master May 2, 2023
4 checks passed
@erni27 erni27 deleted the add-replace-key-method branch May 2, 2023 22:14
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.

None yet

2 participants