BaseCache<K, V> class abstract

Implementers

Constructors

BaseCache()

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

add(K k, V v) bool
Add value in cache only it the element doesn't exist Returns true when element is added otherwise false
clear() → void
Clear all entries
dispose() → void
Dispose cache
exist(K k) bool
Returns true when the key is existing otherwise false
get(K k, {V? fallback}) → V?
Get value in cache or get fallback or null
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove(K k) → V?
Remove value by key
set(K k, V v) bool
Set value in cache, if the value is present it will be overwritten Returns true when element is overwritten otherwise false
toString() String
A string representation of this object.
inherited

Operators

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