Add opt-in cache support
- Dominant language
- Go
- Stars
- 9.6k
- Forks
- 954
- Avg merge
- 23h 27m
- Merged PRs (30d)
- 48
Description
Today syft does not keep a persistent cache of the underlying image information fetched from docker. As we add more subcommands to expose out the latest catalogers, it would be ideal to allow for caching of the image tar for use across multiple commands.
My vote is that this is an opt-in feature (don't feel strongly about this):
```
syft my-image:latest --cache
```
...with a env var (`SYFT_CACHE_ENABLED`) / config option (`syft.cache.enabled`) to opt-in more permanently.
I do believe that if we support this we should expose cache control commands:
```
syft cache clear [image]
syft cache list
```
Contributor guide
Research direction
Start by tracing the syft my-image:latest CLI entry point and how image information is fetched from Docker. Compare the proposed --cache flag, SYFT_CACHE_ENABLED environment variable, syft.cache.enabled configuration option, and cache clear/list commands. Done means persistent image caching is opt-in and the requested cache controls work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100