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_cache that allows bypassing the Redis cache for repository branch names.
  • Modifies the cache_method_as_redis_set method in RepositoryCacheAdapter to accept an avoid_cache parameter that can conditionally skip caching.
  • When the feature flag is enabled, branch_names calls go directly to the raw repository instead of using the Redis cache.
  • Updates both the main branch_names method and the branch_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

Merge request reports

Loading