CacheIt<K, V> class
Create an instance of a cache object.
Constructors
Properties
-
entries
→ Iterable<
V?> -
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Unique cache id
final
- length → int
-
Returns the number cached entries, whether expired or not.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- ttl ↔ int
-
Retrieve ttl for this particular cache.
getter/setter pair
Methods
-
add(
K key, V value) → V? -
Add new
key
andvalue
entry to the cache. -
clear(
) → void - Removes all entries from the cache.
-
get(
K key) → V? -
Retrieve cache value associated with
key
. -
getOrUpdate(
K key, CacheBuilderFn< V> builder) → Future<V?> -
Retrieve cache value associated with
key
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
prune(
) → void - Removes all expired entries from the cache. To be used when cache size and space is an issue.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited