aquasecurity / trivy

Find vulnerabilities, misconfigurations, secrets, SBOM in containers, Kubernetes, code repositories, clouds and more
https://aquasecurity.github.io/trivy
Apache License 2.0
22.14k stars 2.18k forks source link

refactor: unify cache implementations #6977

Closed knqyf263 closed 2 weeks ago

knqyf263 commented 2 weeks ago

Description

Previously, fanal was a separate library, and the cache implementations for the filesystem and Redis were located within the fanal package, while the cache for server mode was implemented in the Trivy package. Now that fanal has been integrated into Trivy, there is no need to keep the cache implementations separate. As a result, we have consolidated the cache-related functionality under the pkg/cache directory.

Additionally, the S3 cache is currently not being used, causing confusion, so this PR removes it.

This refactoring aims to simplify the codebase by:

  1. Unifying the cache implementations in a single package
  2. Eliminating the unused and confusing S3 cache
  3. Improving the overall structure and organization of the cache-related code

Checklist