Cache class
Constructors
- Cache()
-
factory
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 Methods
-
delete(
String key) → Future< void> - remove a key from cache
-
forever(
String key, String value) → Future< void> - set key => value to cache forever
-
get(
String key, [dynamic defaultValue]) → Future - get a value from cache
-
has(
String key) → Future< bool> - get a value exist
-
put(
String key, dynamic value, {Duration duration = const Duration(hours: 1)}) → Future< void> - set key => value to cache default duration is 1 hour