Allow to set labels for Redis calls
What does this MR do and why?
Contributes to #413819
Problem
We had to define all attributes at the moment of Gitlab::Cache::Client is initialized. This is not convenient, because we cannot reuse the same client for multiple calls with different labels.
Solution
Allow to redefine default labels per Redis cache call.
How to set up and validate locally
- Visit http://127.0.0.1:3000/api/v4/projects/2/repository/files/CHANGELOG?ref=master
- It should load without any errors
Roadmap
Step | Description |
---|---|
!122340 (merged) |
Initial refactoring to support labels per call |
!122341 (merged) | Minor refactoring to set default feature category |
!122342 | Extend Rails.cache with labels support |
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Vasilii Iakliushin