SyncCache<K, V> class
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
override
-
clear()
→ void
-
Clear all entries
override
-
dispose()
→ void
-
Dispose cache
override
-
exist(K k)
→ bool
-
Returns true when the key is existing otherwise false
override
-
get(K k, {V? fallback})
→ V?
-
Get value in cache or get fallback or null
override
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
remove(K k)
→ V?
-
Remove value by key
override
-
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
override
-
toString()
→ String
-
A string representation of this object.
inherited