Cache class
Facade for the cache system.
Provides convenient synchronous/static access to the application's cache
manager. Use Cache.put, Cache.get, etc. from anywhere in the codebase.
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
- stats → CacheStats
-
no setter
Static Methods
-
add(
String key, dynamic value, Duration ttl) → Future< bool> -
clear(
) → Future< void> -
decrement(
String key, [int amount = 1]) → Future< int> -
driver(
[String? name]) → CacheDriver -
forever(
String key, dynamic value) → Future< void> -
forget(
String key) → Future< void> -
forgetByTag(
String tag) → Future< void> -
get(
String key) → Future -
has(
String key) → Future< bool> -
increment(
String key, [int amount = 1]) → Future< int> -
many(
List< String> keys) → Future<Map< String, dynamic> > -
pull(
String key) → Future -
put(
String key, dynamic value, Duration ttl) → Future< void> -
putMany(
Map< String, dynamic> values, Duration ttl) → Future<void> -
remember(
String key, Duration ttl, Future callback()) → Future -
store(
String name) → CacheDriver -
tag(
String key, List< String> tags) → Future<void>