I have a requirement to rebuild the cache which is already declared and configured based on a condition.
<code>private static final Cache<String, List<String>> CACHE = CacheBuilder.newBuilder().expireAfterWrite(30, TimeUnit.MINUTES).build();
</code>
<code>private static final Cache<String, List<String>> CACHE = CacheBuilder.newBuilder().expireAfterWrite(30, TimeUnit.MINUTES).build();
</code>
private static final Cache<String, List<String>> CACHE = CacheBuilder.newBuilder().expireAfterWrite(30, TimeUnit.MINUTES).build();
Here I have already created the cache for 30 minutes. now let’s say the user has a configuration to override the expiration time. So I need to rebuild the cache based on the configuration time.
Also is there any way to get cache last access time?