You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For base image layers (downloaded from registries), the layout is
<cache dir>/layers/<(1) SHA of compressed layer blob>/<(2) SHA of uncompressed layer blob>
That is, (1) is a directory and (2) is a filename. (1) is directly visible from the manifest JSON. Different registries may use different compression levels/methods (we actually considered using a different compression level for layers from docker save), so I think hypothetically it is possible that we duplicate the same (uncompressed) layer file. For example,
<cache dir>/layers/<SHA from compression level 1>/<SHA of same contents> <cache dir>/layers/<SHA from compression level 2>/<SHA of same contents>
Now, #1957 implements caching local layers, and the layout is in reverse:
<cache dir>/local/<SHA of uncompressed layer>/<SHA of compressed layer blob>
The reason is that we need to be able to query the cache using the SHA of an uncompressed layer first.
It would be nice if we can have consistency across the board. This can potentially remove almost-identical code duplicate in #1957 by following one execution path.
The text was updated successfully, but these errors were encountered:
For base image layers (downloaded from registries), the layout is
<cache dir>/layers/<(1) SHA of compressed layer blob>/<(2) SHA of uncompressed layer blob>
That is, (1) is a directory and (2) is a filename. (1) is directly visible from the manifest JSON. Different registries may use different compression levels/methods (we actually considered using a different compression level for layers from
docker save
), so I think hypothetically it is possible that we duplicate the same (uncompressed) layer file. For example,<cache dir>/layers/<SHA from compression level 1>/<SHA of same contents>
<cache dir>/layers/<SHA from compression level 2>/<SHA of same contents>
Now, #1957 implements caching local layers, and the layout is in reverse:
<cache dir>/local/<SHA of uncompressed layer>/<SHA of compressed layer blob>
The reason is that we need to be able to query the cache using the SHA of an uncompressed layer first.
It would be nice if we can have consistency across the board. This can potentially remove almost-identical code duplicate in #1957 by following one execution path.
The text was updated successfully, but these errors were encountered: