MCPcopy Index your code
hub / github.com/PatchMon/PatchMon / Evict

Method Evict

server-source-code/internal/context/pool_cache.go:151–164  ·  view source on GitHub ↗

Evict removes the host's pool from the cache and closes it.

(host string)

Source from the content-addressed store, hash-verified

149
150// Evict removes the host's pool from the cache and closes it.
151func (c *PoolCache) Evict(host string) {
152 key := strings.ToLower(strings.TrimSpace(host))
153 if key == "" {
154 return
155 }
156 c.mu.Lock()
157 defer c.mu.Unlock()
158 if ent, ok := c.entries[key]; ok {
159 if ent != nil && ent.db != nil {
160 ent.db.Close()
161 }
162 delete(c.entries, key)
163 }
164}

Callers 1

ReloadHandlerFunction · 0.45

Calls 1

CloseMethod · 0.45

Tested by

no test coverage detected