0

Is there way to get all the keys stored in a azure redis cache with their hit counts?

I want to generate reports with the keys by their hit counts.

Manjunath G
  • 167
  • 2
  • 10
  • 1
    Redis doesn't provide a key-specific hit rate. (Only general hit rate) I don't know if Azure supports one. – Eldar May 19 '22 at 09:47
  • 1
    Redis does not offer a hit rate metric directly. We can still calculate it like this: `hit rate = keyspace_hits / (keyspace_hits + keyspace_misses)` – Harshitha Veeramalla May 19 '22 at 09:50
  • 1
    Please refer [View metrics with Azure Monitor metrics explorer](https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-how-to-monitor#view-metrics-with-azure-monitor-metrics-explorer) – Harshitha Veeramalla May 19 '22 at 09:56
  • Actually what exactly i am trying to achieve is, i need to just delete cache keys, which are not frequently used or used very less. is there a way to identify this? – Manjunath G May 19 '22 at 10:28
  • Redis will automatically do that when it reaches the memory limit depending on your eviction policy configuration. – Eldar May 19 '22 at 12:04

0 Answers0