MruEvictionPolicy class
Discards, in contrast to LRU, the most recently used items first. This algorithm uses the CacheStat.accessTime to keep track of what was used when.
- Inheritance
-
- Object
- EvictionPolicy
- MruEvictionPolicy
Constructors
- MruEvictionPolicy()
-
Builds a MruEvictionPolicy
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< CacheStat?> entries, CacheStat justAdded) → CacheStat? -
Finds the best eviction candidate based on the sampled entries. What
distinguishes this approach from the classic data structures approach is
that an CacheStat contains metadata (e.g. usage statistics) 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.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited