Our solution uses Redisson configuration with a programmatic cache creation using org.redisson.jcache.JCacheManager
with a single Redis server.Caches are created with cache-api
configuration and a ExpiryPolicy.
private Configuration<Object, Object> cacheConfig(final Factory<ExpiryPolicy> expiryPolicyFactory) { var configuration = new MutableConfiguration<>() .setExpiryPolicyFactory(expiryPolicyFactory) .setStatisticsEnabled(true); return RedissonConfiguration.fromInstance(redissonClient, configuration);}
When the application loads for the first time, caches started to be used and for a period they work as expected with high cache hits.
After a period of tests, one (or many) caches start "deteriorating" and cache miss ratio starts to be higher. Cache put time also started to be very high.We have a screen showing cache statistics. This is one example of statistics after the problem occurs.
Cache StatisticsAt the example, all other caches of same type are working as expected. Just "Usuario.funcionalidades" is having the problem.
The problem always happens with a nested collection in a Hibernate entity.See Entity Mapping
Have you seen similar behavior? Any clues about how to understand better what is happening?