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

Method gc

cache/runtime/cache_runtime.go:226–237  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

224}
225
226func (ca *RuntimeCache) gc() {
227 for {
228 <-time.After(ca.gcInterval)
229 if ca.items == nil {
230 return
231 }
232 ca.items.Range(func(key interface{}, v interface{}) bool {
233 ca.itemExpired(fmt.Sprint(key))
234 return true
235 })
236 }
237}
238
239// itemExpired returns true if an item is expired.
240func (ca *RuntimeCache) itemExpired(name string) bool {

Callers 1

NewRuntimeCacheFunction · 0.95

Calls 1

itemExpiredMethod · 0.95

Tested by

no test coverage detected