In a Redis instance that goes above the maxmemory directive, Redis automatically evicts keys following the directives we give it.
We are seeing waves of evictions which is generally intended, but we would like to debug this in order to get an idea about what the last usage date is for keys that would be evicted, in order to drive decisions about how fresh our data is.
Since this algorithm exists and runs, ideally I'd like to be able to run it in "debug" mode to get a list of keys that are candidates for eviction, and then I can get stats about a sample of these individual keys. Alternatively, I'd love to get a sample of the keys that were evicted whenever the last eviction event occurred.
How can I accomplish this in redis?
Thank you