MCPcopy Create free account
hub / github.com/devfeel/dotweb / NewRuntimeCache

Function NewRuntimeCache

cache/runtime/cache_runtime.go:43–47  ·  view source on GitHub ↗

NewRuntimeCache returns a new *RuntimeCache.

()

Source from the content-addressed store, hash-verified

41
42// NewRuntimeCache returns a new *RuntimeCache.
43func NewRuntimeCache() *RuntimeCache {
44 cache := RuntimeCache{items: new(sync.Map), gcInterval: DefaultGCInterval}
45 go cache.gc()
46 return &cache
47}
48
49// Get cache from runtime cache.
50// if non-existed or expired, return nil.

Callers 11

NewRuntimeCacheFunction · 0.92
TestRuntimeCache_GetFunction · 0.70
testRuntimeCacheFunction · 0.70
TestRuntimeCache_DeleteFunction · 0.70
TestRuntimeCache_IncrFunction · 0.70
TestRuntimeCache_DecrFunction · 0.70

Calls 1

gcMethod · 0.95