FiloEvictionPolicy class

This algorithm the cache behaves in the same way as a stack and exact opposite way as a FIFO queue. The cache evicts the entry added most recently first without any regard to how often or how many times it was accessed before. This algorithm uses CacheInfo.creationTime to keep track of when a entry was created.

Constructors

FiloEvictionPolicy()
Builds a FiloEvictionPolicy
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
select(Iterable<CacheInfo?> entries, DateTime now) CacheInfo?
Finds the best eviction candidate based on the sampled entries. What distinguishes this approach from the classic data structures approach is that an CacheInfo contains metadata (e.g. usage information) which can be used for making policy decisions, while generic data structures do not. It is expected that implementations will take advantage of that metadata.
inherited
selectEntry(CacheInfo entry, CacheInfo selectedEntry, DateTime now) bool
Returns true if entry is a better candidate for eviction than the current selectedEntry
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited