Commit 09d9204b authored by Jakub Sztandera's avatar Jakub Sztandera

blocks/blockstore: add CacheOpts - structure of cache config

License: MIT
Signed-off-by: default avatarJakub Sztandera <kubuxu@protonmail.ch>
parent aa8ea8f7
package blockstore
// Next to each option is it aproximate memory usage per unit
type CacheOpts struct {
HasBloomFilterSize int // 1 bit
HasBloomFilterHashes int // No size, 7 is usually best, consult bloom papers
HasARCCacheSize int // 32 bytes
}
func DefaultCacheOpts() CacheOpts {
return CacheOpts{
HasBloomFilterSize: 512 * 8 * 1024,
HasBloomFilterHashes: 7,
HasARCCacheSize: 64 * 1024,
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment