Refactor cache functionality to remove common package dependency
Problem
Due to cyclic dependencies, it's almost impossible to call into the cache package from elsewhere in the code base. This makes migrating to CI Functions harder.
Proposed Solution
- Move configuration from common package to a new
cacheconfigpackage - Remove
common.Builddependency from the cache package - Solve issues like how feature flags affect config outside of the cache package
Benefits
- Eliminates cyclic dependencies in the cache package
- Enables easier integration with CI Functions
- Improves code modularity and separation of concerns
Implementation Details
- Create new
cache/cacheconfigpackage with cache configuration types - Update all cache adapters (S3, GCS, Azure) to use the new configuration types
- Refactor cache functionality to remove dependency on
common.Build - Update tests to reflect the new structure
Acceptance Criteria
- All existing cache tests pass
- Manual cache test with one configured cloud bucket works
Related Work
This refactoring is needed to support the migration to CI Functions platform.
Sources: Draft: Refactor cache functionality to remove common package dependency