MCPcopy
hub / github.com/fish2018/pansou / startCacheCleaner

Function startCacheCleaner

plugin/fox4k/fox4k.go:228–237  ·  view source on GitHub ↗

startCacheCleaner 定期清理缓存

()

Source from the content-addressed store, hash-verified

226
227// startCacheCleaner 定期清理缓存
228func startCacheCleaner() {
229 ticker := time.NewTicker(30 * time.Minute)
230 defer ticker.Stop()
231
232 for range ticker.C {
233 // 清空详情页缓存
234 detailCache = sync.Map{}
235 lastCleanupTime = time.Now()
236 }
237}
238
239// Search 执行搜索并返回结果(兼容性方法)
240func (p *Fox4kPlugin) Search(keyword string, ext map[string]interface{}) ([]model.SearchResult, error) {

Callers 1

initFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected