I'm currently evaluating Redis as a distributed cache.
I've used Terracotta for many years and it does a good job except it doesn't permit horizontal scaling (sharding) unless you pay for a license.
Anyhow, one cool feature that Terracotta had was the ability to set time to idle (TTI) on a particular cache. It might even allow it on a key as well.
What that means is that if a key has not been accessed in over n seconds, it get removed from the cache (along with the associated value). However, if the key is accessed before that n second limit, the timer gets reset to again. So long as the key is accessed frequently enough, it can stay alive much longer than n seconds or even indefinitely.
Time to idle is different than Time to Live which I believe Redis already supports.
Does Redis support Time to idle ?