Skip to content

Allow to set labels for Redis calls

Vasilii Iakliushin requested to merge 413819_allow_to_set_labels_per_call into master

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

  1. Visit http://127.0.0.1:3000/api/v4/projects/2/repository/files/CHANGELOG?ref=master
  2. 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.

Edited by Vasilii Iakliushin

Merge request reports

Loading