Add shared examples for ReactiveCaching

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

  • Close this issue

Problem to solve

ReactiveCache needs some shared examples in the tests to be used by classes that implement ReactiveCache.

  1. Ensure that reactive_caching_lifetime is less than reactive_caching_refresh_interval for most circumstances, but can be overridden for special cases.
  2. Proper implementation of reactive_cache_key (does not return empty [])
  3. Can we check args of with_reactive_cache do no contain reactive_cache_key ?

Questions in MR !20111 (merged) prompted creation of this issue

Intended users

GitLab developers that implement ReactiveCaching support

Further details

ReactiveCaching is powerful, but it's implementation can be complicated. These shared examples should encourage proper implementation and draw attention to possible issues

Proposal

Permissions and Security

Documentation

Documentation is described in #34025 (closed)

What does success look like, and how can we measure that?

What is the type of buyer?

Backstage only

Links / references

Edited Sep 28, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading