1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-27 16:07:42 +08:00

blocks/blockstore: add CacheOpts - structure of cache config

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
This commit is contained in:
Jakub Sztandera
2016-07-04 20:08:18 +02:00
parent a8d9002990
commit 3035aa8935

View File

@ -0,0 +1,16 @@
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,
}
}