chunked layersCache seems to never be actually reused
A side discovery I can’t delve into now: https://github.com/containers/storage/blob/98ad80d6d16593c959d77b03b33af555eb620891/pkg/chunked/cache_linux.go#L114 defines a new local variable, it does not change the value of the global singleton: https://github.com/containers/storage/blob/98ad80d6d16593c959d77b03b33af555eb620891/pkg/chunked/cache_linux.go#L77
AFAICS that means every cache user ( = every chunked differ = every layer extraction) builds the cache from scratch. The fix is trivial in itself, but it would expose currently-impossible concurrency, so it might need specific testing.
Cc: @giuseppe
tentative fix: https://github.com/containers/storage/pull/2024
still marked as Draft as I need to test it better and validate that the locking is still correct