INNER CODE UNIT · Go
err
tazjin/nixery · builder/cache.go:79
err := os.WriteFile(c.mdir+key, []byte(m), 0644)
if err != nil {
slog.Error("failed to locally cache manifest", "err", err, "manifest", key)
}
}
// Retrieve a layer build from the local cache.
func (c *LocalCache) layerFromLocalCache(key string) (*manifest.Entry, bool) {
c.lmtx.RLock()
e, ok := c.lcache[key]
c.lmtx.RUnlock()
return &e, ok
}
// Add a layer build result to the local cache.
func (c *LocalCache) localCacheLayer(key string, e manifest.Entry) {
c.lmtx.Lock()