Skip to content

Add store/layer identification to cache hooks for multi-store setups #1128

@tshtark

Description

@tshtark

Description

When using cache-manager with primary and secondary stores, there's currently no way to identify which specific store/layer served a cache hit when using the built-in multi-store functionality. This makes it impossible to implement proper monitoring and metrics collection per cache layer.

Current Behavior

When configuring cache-manager with primary and secondary stores, The emitted hooks are not specific to the cache layer they are associated with. This makes it difficult to track and monitor the performance of each layer.

Use Case

This feature is essential for:

  1. Performance Monitoring - Understanding cache layer utilization and hit rates
  2. Cost Optimization - Identifying if expensive layers (e.g., Redis) are being utilized effectively
  3. Debugging - Tracing which layer served specific requests
  4. Capacity Planning - Making informed decisions about cache layer sizing

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions