I have implemented a Caffeine
cache as follows:
private static Cache<String, MyObject> MyObjectCache = Caffeine.newBuilder()
.build();
How can I ensure that the cache has no max size and does not expire?
I have implemented a Caffeine
cache as follows:
private static Cache<String, MyObject> MyObjectCache = Caffeine.newBuilder()
.build();
How can I ensure that the cache has no max size and does not expire?
A Caffeine cache can be implemented with no max value and no expiration by the following:
private static Cache<String, MyObject> MyObjectCache = Caffeine.newBuilder()
.build();
I.e. it is created without a max value and expiration as default.
© 2022 - 2024 — McMap. All rights reserved.