my ideal cache using guava
Off and on for the past few weeks I've been trying to find my ideal cache implementation using guava's MapMaker . See my previous two questions here and here to follow my thought process. Taking what I've learned, my next attempt is going to ditch soft values in favor of maximumSize and expireAfterAccess: ConcurrentMap<String, MyObject> cache = new MapMaker() .maximumSize(MAXIMUM_SIZE) .expireAfterAccess(MINUTES_TO_EXPIRY, TimeUnit.MINUTES) .makeComputingMap(loadFunction); where Function<String, MyObject> loadFunction = new Function<String, MyObject>() { @Override public MyObject apply(String