Skip to content

Conversation

@thevilledev
Copy link
Contributor

When evicting all entries (100% eviction), store the count before clearing the map. Previously we were reporting the length of an empty map, resulting in incorrect eviction metrics. The fix ensures accurate reporting of mass evictions for monitoring cache behavior.

Added test coverage to verify both the evicted entries count and forced eviction events are correct.

When evicting all entries (100% eviction), store the count before
clearing the map. Previously we were reporting the length of an empty
map, resulting in incorrect eviction metrics. The fix ensures accurate
reporting of mass evictions for monitoring cache behavior.

Added test coverage to verify both the evicted entries count and
forced eviction events are correct.

Signed-off-by: Ville Vesilehto <ville@vesilehto.fi>
@viccon viccon self-assigned this Feb 17, 2025
@viccon viccon merged commit 59ea4b2 into viccon:main Feb 17, 2025
1 check passed
@viccon
Copy link
Owner

viccon commented Feb 17, 2025

@thevilledev Thank you so much for this contribution and I really appreciate that you updated the test

@thevilledev
Copy link
Contributor Author

No problem, happy to contribute!

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.

2 participants