Feature flag: short_ttl_approval_cache

Summary

Feature flag rollout issue for short_ttl_approval_cache.

This feature flag gates a short-TTL (30-second) Redis cache for MR approval state in the mergeability check framework. When enabled, CheckApprovedService caches its result using a fingerprint-based cache key that automatically invalidates when approval rules or approvals change.

What does the feature flag do?

When enabled, the CheckApprovedService mergeability check becomes cacheable with a 30-second TTL. This avoids repeated expensive approval computations during UI/API polling.

  • Cache key includes a fingerprint of both MR-level and project-level approval rules plus current approvals
  • Cache is automatically bypassed during actual merge operations (use_cache: false)
  • 30-second TTL provides a safety net for any edge cases the fingerprint doesn't capture

MR

!227379 (merged)