Concurrent writes/reads to the cache might result in partially written
files, which we'd like to avoid.
On top of that, we generally don't want builds to fail if something goes
wrong with the cache, so now we just log any cache errors and do a
fallback.
Signed-off-by: Jon Johnson <jon.johnson@chainguard.dev>
I have a suspicion that this is causing a race where we modify the
cache's index.json file before we actually write out the image's config
file, so if we call RawConfigFile before we finish caching it, we'll
just fail to find that file.
Signed-off-by: Jon Johnson <jon.johnson@chainguard.dev>