MCPcopy
hub / github.com/dgraph-io/badger / WithMaxCacheSize

Method WithMaxCacheSize

options.go:572–575  ·  view source on GitHub ↗

WithMaxCacheSize returns a new Options value with MaxCacheSize set to the given value. This value specifies how much data cache should hold in memory. A small size of cache means lower memory consumption and lookups/iterations would take longer. It is recommended to use a cache if you're using comp

(size int64)

Source from the content-addressed store, hash-verified

570//
571// Default value of MaxCacheSize is zero.
572func (opt Options) WithMaxCacheSize(size int64) Options {
573 opt.MaxCacheSize = size
574 return opt
575}
576
577// WithInMemory returns a new Options value with Inmemory mode set to the given value.
578//

Callers 2

getTestOptionsFunction · 0.80
TestGetFunction · 0.80

Calls

no outgoing calls

Tested by 2

getTestOptionsFunction · 0.64
TestGetFunction · 0.64