MCPcopy Create free account
hub / github.com/Creatly/creatly-backend / NewMemoryCache

Function NewMemoryCache

pkg/cache/memory.go:23–28  ·  view source on GitHub ↗

NewMemoryCache uses map to store key:value data in-memory.

()

Source from the content-addressed store, hash-verified

21
22// NewMemoryCache uses map to store key:value data in-memory.
23func NewMemoryCache() *MemoryCache {
24 c := &MemoryCache{cache: make(map[interface{}]*item)}
25 go c.setTtlTimer()
26
27 return c
28}
29
30func (c *MemoryCache) setTtlTimer() {
31 for {

Callers 2

RunFunction · 0.92
initDepsMethod · 0.92

Calls 1

setTtlTimerMethod · 0.95

Tested by 1

initDepsMethod · 0.74