MCPcopy Create free account
hub / github.com/patrickmn/go-cache / Run

Method Run

cache.go:1076–1087  ·  view source on GitHub ↗
(c *cache)

Source from the content-addressed store, hash-verified

1074}
1075
1076func (j *janitor) Run(c *cache) {
1077 ticker := time.NewTicker(j.Interval)
1078 for {
1079 select {
1080 case <-ticker.C:
1081 c.DeleteExpired()
1082 case <-j.stop:
1083 ticker.Stop()
1084 return
1085 }
1086 }
1087}
1088
1089func stopJanitor(c *Cache) {
1090 c.janitor.stop <- true

Callers 1

runJanitorFunction · 0.95

Calls 1

DeleteExpiredMethod · 0.45

Tested by

no test coverage detected