MCPcopy Create free account
hub / github.com/TalkingData/owl / newCache

Function newCache

controller/cache/cache.go:261–270  ·  view source on GitHub ↗
(de time.Duration, m map[string]Item)

Source from the content-addressed store, hash-verified

259}
260
261func newCache(de time.Duration, m map[string]Item) *cache {
262 if de == 0 {
263 de = -1
264 }
265 c := &cache{
266 defaultExpiration: de,
267 items: m,
268 }
269 return c
270}
271
272func newCacheWithJanitor(defaultExpiration time.Duration, cleanupInterval time.Duration, items map[string]Item) *Cache {
273 c := newCache(defaultExpiration, items)

Callers 1

newCacheWithJanitorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected