MCPcopy Create free account
hub / github.com/AdRoll/baker / Cache

Struct Cache

filter/metadata/cache.go:14–19  ·  view source on GitHub ↗

Cache is a concurrent size-limited cache. If the cache size reaches maxCacheEntries all existing entries are removed. maxCacheEntries should effectively be the number of workers in the topology, but rather than expose that information to filters we for now just use an estimated max of 100.

Source from the content-addressed store, hash-verified

12// topology, but rather than expose that information to filters we for
13// now just use an estimated max of 100.
14type Cache struct {
15 cache sync.Map
16
17 mx sync.Mutex
18 nentries int64
19}
20
21// Store caches key and value in the cache.
22func (c *Cache) Store(key, value interface{}) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected