Virtual Registry: Refactor cache purging logic to use a common worker
What does this MR do and why?
This MR consolidates duplicate cache purging logic across Virtual Registries by introducing a common worker class. Previously, both Container and Maven virtual registries had separate but nearly identical MarkEntriesForDestructionWorker classes that performed the same cache entry destruction operations.
What it does:
- Creates a new shared
VirtualRegistries::Cache::MarkEntriesForDestructionWorkerthat handles cache purging for both Container and Maven virtual registries - Updates all upstream models (
VirtualRegistries::Container::UpstreamandVirtualRegistries::Packages::Maven::Upstream) to use the common worker - Changes the worker parameter from upstream ID to Global ID string for polymorphic support
- The 1st step from the docs guide towards removing the existing package-specific workers.
References
- Extract common code for cache purging (#582162 - closed) • Moaz Khalifa • 18.7
- Add delete cache API for container virtual regi... (!213785 - merged) • Adie (she/her) • 18.7
- Add purge cache functionality for Maven virtual... (!195815 - merged) • Moaz Khalifa • 18.2
Screenshots or screen recordings
N/A
How to set up and validate locally
Follow these steps: !213785 (merged)
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #582162 (closed)
Edited by Moaz Khalifa