I'm using ehCache to store users information. I set it as
usersDB = cacheManager.....withExpiry(ExpiryPolicyBuilder. timeToIdleExpiration(Duration.ofDays(1))));
My thought was that if a user won't use the system for 1 day, it will be removed from the cache. The problem is that the client (Android) has a widget that refreshes every day and for that to happen, I need to access the user's data: usersDB.get(email)...
.
I guess that such access initializes the idle timer, right? That means that the user will never be idle and will never be removed from the cache. Any idea how to overcome this?
Thanks