Skip to content

Conversation

@jasuwienas
Copy link
Contributor

Description

The Cache Client creator has been moved into a dedicated factory, which is injected directly into the cache service.

Problem:

  • The task requirement of having the factory return a single client cannot be met, because we must retain fallback logic (using try/catch blocks and conditional checks) within the cache service.

This approach allows us to minimize changes and keep the CacheService intact, focusing only on injecting the target service dependency.

Related issue(s)

Fixes #4558

Testing Guide

  1. Start on main.
  2. Run all tests with debug mode on without this tasks changes applied.
  3. Dump metrics for cache counters from prometheus.
  4. Switch to this branch.
  5. Run all tests with debug mode on WITHOUT this tasks changes applied.
  6. Make sure they all pass.

Changes from original design

None

N/A

Additional work needed (optional)

N/A

Checklist

  • I've assigned an assignee to this PR and related issue(s) (if applicable)
  • I've assigned a label to this PR and related issue(s) (if applicable)
  • I've assigned a milestone to this PR and related issue(s) (if applicable)
  • I've updated documentation (code comments, README, etc. if applicable)
  • I've done sufficient testing (unit, integration, etc.)

@jasuwienas jasuwienas closed this Nov 20, 2025
@jasuwienas jasuwienas deleted the 4558-factory-for-cache-client-simplified branch November 20, 2025 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create factory for CacheClient

1 participant