MCPcopy Create free account
hub / github.com/baidu/EasyFaaS / newCache

Function newCache

pkg/util/cache/cache.go:1120–1129  ·  view source on GitHub ↗
(de time.Duration, m map[string]Item)

Source from the content-addressed store, hash-verified

1118}
1119
1120func newCache(de time.Duration, m map[string]Item) *cache {
1121 if de == 0 {
1122 de = -1
1123 }
1124 c := &cache{
1125 defaultExpiration: de,
1126 items: m,
1127 }
1128 return c
1129}
1130
1131func newCacheWithJanitor(de time.Duration, ci time.Duration, m map[string]Item) *Cache {
1132 c := newCache(de, m)

Callers 1

newCacheWithJanitorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected