Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is difference between ttl and maxIdletime in Redisson CacheConfig

I tried to refer to documents but still I am not clear between difference between ttl an maxIdleTime in CacheConfig class in Redisson.

Can anyone shed some light please?

like image 488
Jaydeep Patel Avatar asked Dec 19 '22 02:12

Jaydeep Patel


1 Answers

  • maxIdleTime enables cached object to be kept in as long as it is requested in periods shorter than maxIdleTime
  • ttl will make the cached object be invalidated after that many seconds regardless of how many times or when it was requested.
like image 174
Pankaj Gadge Avatar answered Dec 28 '22 07:12

Pankaj Gadge