MCPcopy
hub / github.com/wavetermdev/waveterm / cleanCache

Function cleanCache

pkg/suggestion/filewalk.go:54–64  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

52}
53
54func cleanCache() {
55 cacheMu.Lock()
56 defer cacheMu.Unlock()
57 now := time.Now()
58 for key, entry := range cache {
59 if now.After(entry.expiration) {
60 cacheLRU.Remove(entry.lruElement)
61 delete(cache, key)
62 }
63 }
64}
65
66func getCache(key string) ([]DirEntryResult, bool) {
67 cacheMu.Lock()

Callers 1

initFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected