MCPcopy Create free account
hub / github.com/astercloud/aster / cleanupLoop

Method cleanupLoop

pkg/tools/cache.go:391–398  ·  view source on GitHub ↗

后台清理任务

()

Source from the content-addressed store, hash-verified

389// 后台清理任务
390
391func (c *ToolCache) cleanupLoop() {
392 ticker := time.NewTicker(5 * time.Minute)
393 defer ticker.Stop()
394
395 for range ticker.C {
396 c.cleanup()
397 }
398}
399
400func (c *ToolCache) cleanup() {
401 c.stats.LastCleanupAt = time.Now()

Callers 1

NewToolCacheFunction · 0.95

Calls 2

cleanupMethod · 0.95
StopMethod · 0.65

Tested by

no test coverage detected