1

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

Rexave
  • 367
  • 1
  • 3
  • 15
  • Possible duplicate of [Expired Redisson Keys still visible in Redis Cli](https://stackoverflow.com/questions/46824834/expired-redisson-keys-still-visible-in-redis-cli) – Redisson_RuiGu Dec 06 '17 at 23:15
  • please see my answers here: https://stackoverflow.com/questions/46824834/expired-redisson-keys-still-visible-in-redis-cli/46838604#46838604 – Redisson_RuiGu Dec 06 '17 at 23:16
  • I'm not using a `RMapCache`but a `RSetCache`. I edited the post. By the way, I can see a "score" field associated with the value in the list in Redis. Is it the `ttl` or the eviction date ? – Rexave Dec 07 '17 at 08:13
  • The same logic applies to RSetCache too. – Redisson_RuiGu Dec 09 '17 at 00:59

0 Answers0