hitRate property
double
get
hitRate
Calculates the cache hit rate as a percentage.
Returns a value between 0.0 and 100.0. If there are no operations, returns 0.0.
Implementation
double get hitRate {
final total = hits + misses;
return total > 0 ? (hits / total) * 100.0 : 0.0;
}