MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / NewIntervalCache

Function NewIntervalCache

pkg/util/cache/cache.go:566–573  ·  view source on GitHub ↗

NewIntervalCache creates a new Cache backed by an interval tree. See NewCache() for details on parameters.

(config Config, logErrorf IntervalCacheLogErrorf)

Source from the content-addressed store, hash-verified

564// NewIntervalCache creates a new Cache backed by an interval tree.
565// See NewCache() for details on parameters.
566func NewIntervalCache(config Config, logErrorf IntervalCacheLogErrorf) *IntervalCache {
567 ic := &IntervalCache{
568 baseCache: newBaseCache(config),
569 logErrorf: logErrorf,
570 }
571 ic.baseCache.init(ic)
572 return ic
573}
574
575// NewKey creates a new interval key defined by start and end values.
576func (ic *IntervalCache) NewKey(start, end []byte) *IntervalKey {

Callers

nothing calls this directly

Calls 2

newBaseCacheFunction · 0.85
initMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…