java.lang.Object
com.orientechnologies.orient.core.storage.cache.chm.AsyncReadCache
All Implemented Interfaces:
OReadCache

public final class AsyncReadCache extends Object implements OReadCache
Disk cache based on ConcurrentHashMap and eviction policy which is asynchronously processed by handling set of events logged in lock free event buffer. This feature first was introduced in Caffeine framework https://github.com/ben-manes/caffeine and in ConcurrentLinkedHashMap library https://github.com/ben-manes/concurrentlinkedhashmap . The difference is that if consumption of memory in cache is bigger than 1% disk cache is switched from asynchronous processing of stream of events to synchronous processing. But that is true only for threads which cause loading of additional pages from write cache to disk cache. Window TinyLFU policy is used as cache eviction policy because it prevents usage of ghost entries and as result considerably decrease usage of heap memory.