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
{{ message }}
Repository navigation
cleanup: delete internal/cache in favor of oras-go/content/cache #2313
Reduce cmd/oras/internal/option/cache.go to a delegation to cache.NewFromEnv() / (*Cache).ReadOnlyTarget(), and delete internal/cache/.
Net ~−380 LOC.
Caveat to check before swapping
The library documents an interface narrowing:
Note: The returned target implements only oras.ReadOnlyTarget. If the source implements additional interfaces (e.g. registry.ReferenceFetcher), those methods are also cached, but type assertions for other interfaces may fail.
Audit every caller of option.Cache.CachedTarget for type assertions on registry.ReferenceFetcher, registry.ReferenceParser, registry.TagLister, etc. internal/cache/target.go builds explicit wrapper types for these combinations, so the narrowing is a real behavioural difference, not a doc formality.
Acceptance
internal/cache/ deleted
No caller of CachedTarget regresses on an interface assertion
Any scenario in internal/cache/target_test.go not already covered upstream is retained as regression coverage
We don't assign issues on this project, but welcome PRs. I don't want to merge this change until after our next CLI release though because I want to minimize the changes to the next release, so you should expect it to take a while to mergge. Thanks!
Activity
Avadhut03 commentedon Nov 9, 2026
Hi @TerryHowe , I would like to work on this issue. Can you assign it to me?
TerryHowe commentedon Nov 9, 2026
We don't assign issues on this project, but welcome PRs. I don't want to merge this change until after our next CLI release though because I want to minimize the changes to the next release, so you should expect it to take a while to mergge. Thanks!