moby / buildkit

concurrent, cache-efficient, and Dockerfile-agnostic builder toolkit
https://github.com/moby/moby/issues/34227
Apache License 2.0
7.85k stars 1.09k forks source link

rename cache pkg to snapshot #77

Open tonistiigi opened 6 years ago

tonistiigi commented 6 years ago

cache package is weirdly named, it contains the manager for snapshot references(that are automatically garbage collected, therefore the name cache). Otoh snapshot package is almost unused. I think it would make sense to move that code under snapshot: snapshot.ImmutableRef, snapshot.Manager etc. and leave the cache package for instruction/content cache.

@AkihiroSuda wdyt?

AkihiroSuda commented 6 years ago

SGTM, although we may want to rename that again in the future :smile:

AkihiroSuda commented 6 years ago

@tonistiigi Can we also rename s/MutableRef/ActiveSnapshot/g and s/ImmutableRef/CommitedSnapshot/g ? It corresponds to containerd terminology and I think it is more understandable, but just my 2 cents.

tonistiigi commented 6 years ago

@AkihiroSuda I agree it corresponds to the containerd terminology, but don't really think it is more understandable. Unless you read containerd docs it is quite hard to understand what active/committed means. Btw, mutable was called active in the early commits.

tonistiigi commented 6 years ago

Lets do this after llbsolver-next merge

AkihiroSuda commented 5 years ago

This seems no longer on plan now?

tonistiigi commented 5 years ago

I think it still makes sense but low priority and I forgot