storage
storage copied to clipboard
chunked: fix reuse of the layers cache
the global singleton was never updated, causing the cache to be always recreated for each layer.
It is not possible to keep the layersCache mutex for the entire load() since it calls into some store APIs causing a deadlock since findDigestInternal() is already called while some store locks are held.
Closes: https://github.com/containers/storage/issues/2023