[Question]can bigcache add func reset stats
Ouverte
- Langage dominant
- Go
- Étoiles
- 8.2k
- Forks
- 614
- Merge moyen
- 5 j 12 h
- PR mergées (30 j)
- 1
Description
I want to calculate the 10 second cache hit rate, but func Stats() get hit rate is from when cache is init.
can bigcache add func reset stats
for example
```
func (c *BigCache) ResetStats() {
for _, shard := range c.shards {
shard.resetStats()
}
}
func (s *cacheShard) resetStats() {
s.stats = Stats{}
}
```
of course, i can record last Stats and get new Stats after 10 seconds, then use it calc hit rate. but i think add reset stats func can make code more clear
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Évaluation
Cette issue n'a pas encore été évaluée.