MCPcopy
hub / github.com/cortexlabs/cortex / cleanupCache

Function cleanupCache

pkg/lib/telemetry/error_cache.go:91–103  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

89}
90
91func cleanupCache() {
92 staleErrorMessages := findStaleCachedErrors()
93
94 if len(staleErrorMessages) == 0 {
95 return
96 }
97
98 _errorCache.Lock()
99 defer _errorCache.Unlock()
100 for errMsg := range staleErrorMessages {
101 delete(_errorCache.m, errMsg)
102 }
103}
104
105func findStaleCachedErrors() strset.Set {
106 _errorCache.RLock()

Callers 1

shouldBlockFunction · 0.85

Calls 1

findStaleCachedErrorsFunction · 0.85

Tested by

no test coverage detected