FIFOCache class

Naive LinkedHashMap-based cache of Uint8Lists.

FIFO policy is used, meaning if _cache exceeds its _maxSize or _maxLength, then the first inserted element is removed.

Constructors

FIFOCache()

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
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

size int
Returns the total size _cache occupies.
no setter

Static Methods

clear() → void
Removes all entries from the _cache.
exists(String key) bool
Indicates whether an item with the provided key exists.
get(String key) Uint8List?
Returns the Uint8List of the provided key, if any is cached.
set(String key, Uint8List bytes) → void
Puts the provided bytes to the cache.