Cache keys are evicted before the TTL with reason 0(expired)
- Vorherrschende Sprache
- Go
- Sterne
- 8.2k
- Forks
- 614
- Ø Merge
- 5 T. 12 Std.
- Gemergte PRs (30 T.)
- 1
Beschreibung
```
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?
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.