Stop caching repository branch_names with cache_method_as_redis_set
What does this MR do and why?
This MR introduces a feature flag mechanism to conditionally disable Redis caching for the branch_names method in the Repository model.
- Adds a new feature flag
avoid_branch_names_cachethat allows bypassing the Redis cache for repository branch names. - Modifies the
cache_method_as_redis_setmethod inRepositoryCacheAdapterto accept anavoid_cacheparameter that can conditionally skip caching. - When the feature flag is enabled,
branch_namescalls go directly to the raw repository instead of using the Redis cache. - Updates both the main
branch_namesmethod and thebranch_names_include?helper method to respect the cache bypass.
References
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 #569853 (closed)
Edited by Javiera Tapia