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:
- Performance Monitoring - Understanding cache layer utilization and hit rates
- Cost Optimization - Identifying if expensive layers (e.g., Redis) are being utilized effectively
- Debugging - Tracing which layer served specific requests
- Capacity Planning - Making informed decisions about cache layer sizing