bigcache
bigcache copied to clipboard
Add ResetKeyMetadata method to resets per-key metadata.
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()andcacheShard.resetKeyMetadata()to clear per-key request counts. - Ensures thread safety by locking shards during reset.