abstract class CachedFactoryBase[Key, InternalKey, InitData, Value] extends AutoCloseable
A unified cache implementation that combines properties of reference counting and LRU caching.
Values that are actively being used are tracked in a list. When released, values move to an LRU cache for potential reuse. Values are evicted from the LRU cache when it exceeds maxCacheSize.
Returns true if the cache entry associated with the given key is still valid. If false, the entry will be removed from the cache and setup will be invoked.
Returns true if the cache entry associated with the given key is still valid. If false, the entry will be removed from the cache and setup will be invoked.
Release a reference to a specific value, matching by value identity. This should be used when shareValues = false and multiple entries may have the same key.
Release a reference to a specific value, matching by value identity. This should be used when shareValues = false and multiple entries may have the same key.