Open zacscoding opened 2 years ago
Add cache hit field in Item.
Hello :) I want to record cache metrics with labels when calling Once function like below
Once
item := &Item{} if err := cache.Once(item); err != nil { return err } metrics.IncCacheTotal("product") if item.CacheHit { metrics.IncCacheHit("product") }
I found Stats() function but this function provides only total count of hits and misses :(
Stats()
Add cache hit field in Item.
Hello :) I want to record cache metrics with labels when calling
Once
function like belowI found
Stats()
function but this function provides only total count of hits and misses :(