-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Description
First of all, let me say I love Redis! And I am really sorry if there is an obvious solution I missed.
The problem/use-case that the feature addresses
I want to run some maintenance on my Redis instance, that has a LRU eviction policy and a max memory limit.
The idea is to loop over the keys, get the values length with strlen, and evict the keys whose values have the biggest lengths.
The issue: commands like get and strlen reset the idletime, which is not great regarding the eviction policy.
Description of the feature
I would like a way to have a way to run get/strlen commands without updating the idletime. Also, perhaps something similar for "freq" when on LFU policy.
Alternatives you've considered
I don't think it is possible to manually set the idletime, but if I am wrong, then I could store the idletime before doing the get, then restore it after.
Additional information
I will use Python with redis-py to implement this.