getStats method
Gets cache statistics.
Returns a statistics object containing various cache performance metrics. Statistics are tracked in real-time and provide insights into cache usage.
Returns:
hits: Number of successful cache retrievalsmisses: Number of cache missessets: Number of cache writesdeletions: Number of cache deletionsexpirations: Number of expired entries encounteredhitRate: Cache hit rate as a percentage (0.0 to 100.0)totalOperations: Total number of cache operations
Implementation
CacheStats getStats() {
return _stats.copy();
}