get_hot_keys
Identify top accessed keys from Valkey or Redis using frequency or idle time to detect cache-busting keys and uneven access patterns.
Instructions
Get hot key tracking data from persisted storage. BetterDB periodically scans keys using LFU frequency scores (when maxmemory-policy is an LFU variant) or OBJECT IDLETIME / COMMANDLOG-derived frequency. Each snapshot captures the top keys ranked by access frequency. Use this to find cache-busting keys, uneven access patterns, or keys that dominate throughput. The signalType field in each entry indicates which detection mode was active (lfu or idletime).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max entries to return (default 50, max 200) | |
| endTime | No | End time (Unix timestamp ms) | |
| startTime | No | Start time (Unix timestamp ms) | |
| instanceId | No | Optional instance ID override |