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 Random eviction policy #55

Merged
merged 1 commit into from
Jan 14, 2024
Merged

Add Random eviction policy #55

merged 1 commit into from
Jan 14, 2024

Conversation

erni27
Copy link
Owner

@erni27 erni27 commented Jan 14, 2024

This PR:

  • adds new eviction policy EvictionPolicyRandom (it evicts the random entry from the cache if max entries limit exceeded)

Partially fixes: #51

Copy link

codecov bot commented Jan 14, 2024

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (50ebc73) 95.79% compared to head (7364fb7) 95.59%.

Files Patch % Lines
eviction.go 84.61% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #55      +/-   ##
==========================================
- Coverage   95.79%   95.59%   -0.20%     
==========================================
  Files           6        6              
  Lines         951      977      +26     
==========================================
+ Hits          911      934      +23     
- Misses         35       38       +3     
  Partials        5        5              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@erni27 erni27 marked this pull request as ready for review January 14, 2024 13:47
@erni27 erni27 added this to the 1.2.0 Release milestone Jan 14, 2024
@erni27 erni27 merged commit 62fa76e into master Jan 14, 2024
4 checks passed
@erni27 erni27 deleted the add-random-eviction-policy branch January 14, 2024 13:59
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.

Explore other eviction policies
1 participant