Prepare GitLab application for cache's transition to Redis Cluster

This issue tracks efforts to update the Gitlab Rails codebase to be compatible with Redis-Cluster in the context of cache operations.

Considerations

  • Presence of cross-slot operations. This is tracked in #2320 (closed) which is the single-source-of-truth.
  • FeatureFlags uses Rails.cache as its L2 store, creating a dependency loop if MultiStore were to be used when setting Rails.cache. This is resolved in gitlab-org/gitlab!119279 (merged).

Actionable

  • Implement cross-slot pipeline: gitlab-org/gitlab!120251 (merged)
  • Add cache to the config/redis.yml.example to test it against Redis Cluster on CI after gitlab-org/gitlab!120566 (merged) is merged
  • Update Gitlab::Redis::Cache call-sites to be cross-slot compatible - after #2320 (closed) concludes
  • Update Gitlab::Redis::RepositoryCache call-sites to be cross-slot compatible as it's config fallback is cache. This would affect the CI and SM customers (if they were to adopt Redis Cluster).
Edited by Sylvester Chin