class FifoCacheReplacementPolicy : CacheReplacementPolicy
A cache replacement policy which evicts the oldest object from cache to make space when cache is full.
FifoCacheReplacementPolicy(cacheSize: Int)
A cache replacement policy which evicts the oldest object from cache to make space when cache is full. |
val cacheSize: Int
Size of the cache |
fun clearRegistryUnsafe(): Unit
Clear any state and reset to initial. For example, clearRegistryUnsafe any linked list state for LRU or FIFO cache. |
|
fun evictUnsafe(): CacheableContainer?
Prune the cache by 1 entry. Returns the removed object. Call this method when cache runs out of space. |
|
fun registerObjectUnsafe(obj: CacheableContainer): CacheableContainer?
Adds a cache entry for the object and returns the entry of a pruned object. Pruning occurs when the cache space is full. |
|
fun unregisterObjectUnsafe(obj: CacheableContainer): Unit
Remove |