go-containerregistry icon indicating copy to clipboard operation
go-containerregistry copied to clipboard

cache: key mismatch makes cache inefficient

Open chlunde opened this issue 4 years ago • 4 comments

When using cache .Layers(), the cache is never used.

This is because the layers are retrieved by a different hash then they are stored.


I created a proof of concept/draft with a symlink from diffid -> digest, so Get (and Delete) accept both hashes, but the changes were larger than I expected, I'm not sure if this is the right approach.

https://github.com/google/go-containerregistry/compare/main...chlunde:cache-digest-and-diffid?expand=1

chlunde avatar Feb 24 '21 21:02 chlunde