put stores a fresh detection result.
(name string, installed bool, version string)
| 91 | |
| 92 | // put stores a fresh detection result. |
| 93 | func (c *detectionCache) put(name string, installed bool, version string) { |
| 94 | c.mu.Lock() |
| 95 | c.entries[name] = detectionEntry{Installed: installed, Version: version, DetectedAt: time.Now()} |
| 96 | c.mu.Unlock() |
| 97 | } |
| 98 | |
| 99 | // persist writes the in-memory entries to disk atomically. Best-effort: a |
| 100 | // write failure only means the next cold start re-probes, which is correct. |
no outgoing calls