Cache keys are evicted before the TTL with reason 0(expired)
- 主要言語
- Go
- スター
- 8.2k
- フォーク
- 614
- 平均マージ
- 5日 12時間
- マージ済み PR(30日)
- 1
説明
```
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?
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
評価
この issue はまだ評価されていません。