I don't understand how eviction work on set with Redisson.
Thanks to the wiki, i can see there is an org.redisson.EvictionScheduler
. This worker is supposed to schedule execution to evict old keys in Redis. This method is used to apply TTL on sub-element of a list, and not globally on the key holding the list in Redis. (The TTL on the key list is set to -1
by the way)
I can't make this work, the scheduler doesn't seem to execute. Do i have to create some more bean on the spring conf ? Is there any additional things to do ?
I'm using a RSetCache.
to put a value :
redisson.getSetCache(key, stringCodec).add(value, lifeSpan, TimeUnit.MILLISECONDS);
so i'm using this method : org.redisson.api.RSetCache#add