My application is sometimes not used for 24 hours or more, but when it receives a request, it is very slow because the data must be retrieved from the database. Here is the current ehcache configuration:
timeToIdleSeconds="120" timeToLiveSeconds="120"
I am considering using the following configuration:
timeToIdleSeconds="172800" timeToLiveSeconds="0"
i.e. it never expires according to timeToLiveSeconds, and the cache waits 48 hours (48 * 60 * 60 = 172,800) after the last access before the expiration date.
Does that make sense at all?
Thanks in advance,
Julien.
source share