How can I organize a 2 level cache in Java?
Where I can find information about 2 level cache implementation and cache strategies configuration or can you show me any methods that can solve this problem.
I suggest using imcache and load necessary items from disk using cache loader as follows,
Cache<String,Object> yourCache = CacheBuilder.
   concurrentHeapCache().cacheLoader(new CacheLoader<String, Object>() {
   public Object load(String key) {
   //code to load item from file.
   }
}).build();  
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With