Skip to content

Conversation

@askomorokhov
Copy link

Add ResetKeyMetadata Method to Clear Per-Key Request Counts
This PR introduces a ResetKeyMetadata method to BigCache, allowing users to reset per-key metadata such as request counts.
Similar to the existing Reset and ResetStats methods, ResetKeyMetadata helps clean up accumulated request statistics without affecting cached entries.

This is useful for applications that need to periodically clear usage metrics while retaining cache data.

Summary of changes:

  • Added BigCache.ResetKeyMetadata() and cacheShard.resetKeyMetadata() to clear per-key request counts.
  • Ensures thread safety by locking shards during reset.

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