allegro / allegro/bigcache

Cache keys are evicted before the TTL with reason 0(expired)

オープン
#267 コメント 10 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug
主要言語
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 はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。