Cache keys are evicted before the TTL with reason 0(expired)
- Langage dominant
- Go
- Étoiles
- 8.2k
- Forks
- 614
- Merge moyen
- 5 j 12 h
- PR mergées (30 j)
- 1
Description
```
bigcache.NewBigCache(bigcache.Config{
Shards: 128,
LifeWindow: 30 * time.Minute,
CleanWindow: 20 * time.Minute,
MaxEntriesInWindow: 200 * 30 * 60,
MaxEntrySize: 100,
Verbose: true,
Hasher: nil,
HardMaxCacheSize: 500,
OnRemove: nil,
OnRemoveWithReason: func(key string, entry []byte, reason bigcache.RemoveReason){
logger.Info("Cache eviction", zap.String("key", key), zap.Uint32("reason", uint32(reason)))
},
Logger: nil,
})
```
This is my configuration for Bigcache.
Problem statement:
The life window is set to 30 minutes. But, the cache keys are evicted before TTL(in 2/3 minutes). I have logged the OnRemoveWithReason. The reason is always 0 (Expired).
What am I missing?
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Évaluation
Cette issue n'a pas encore été évaluée.