File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -22,10 +22,13 @@ type Config struct {
2222 Verbose bool
2323 // Hasher used to map between string keys and unsigned 64bit integers, by default fnv64 hashing is used.
2424 Hasher Hasher
25- // HardMaxCacheSize is a limit for cache size in MB. Cache will not allocate more memory than this limit .
25+ // HardMaxCacheSize is a limit for BytesQueue size in MB.
2626 // It can protect application from consuming all available memory on machine, therefore from running OOM Killer.
2727 // Default value is 0 which means unlimited size. When the limit is higher than 0 and reached then
28- // the oldest entries are overridden for the new ones.
28+ // the oldest entries are overridden for the new ones. The max memory consumption will be bigger than
29+ // HardMaxCacheSize due to Shards' s additional memory. Every Shard consumes additional memory for map of keys
30+ // and statistics (map[uint64]uint32) the size of this map is equal to number of entries in
31+ // cache ~ 2×(64+32)×n bits + overhead or map itself.
2932 HardMaxCacheSize int
3033 // OnRemove is a callback fired when the oldest entry is removed because of its expiration time or no space left
3134 // for the new entry, or because delete was called.
You can’t perform that action at this time.
0 commit comments