DVCache class
The cache behind DV.Cache, on the store dartvel.cache names.
- Inheritance
-
- Object
- DVCacheView
- DVCache
Constructors
- DVCache()
-
const
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
-
delete(
Object target) → Future< void> -
Removes what
targetnames: aStringkey drops that entry, a DVCacheTag drops every entry tagged with it, and DVCache.all drops every entry and every tag.inherited -
get<
T> (String key, {FutureOr< T> compute()?, Duration? ttl, List<String> ? tags, Duration? staleFor}) → Future<T?> -
The value under
key, or null when there is none, it expired, or it is not aT.inherited -
has(
String key) → Future< bool> -
Whether
keyholds a value that has not expired.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
set(
String key, Object? value, {Duration? ttl, List< String> tags = const <String>[]}) → Future<void> -
Stores
valueunderkey.inherited -
toString(
) → String -
A string representation of this object.
inherited
-
withAdapter(
DVCacheAdapter adapter) → DVCacheView -
The same four calls on
adapterinstead of the configured store.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- all → const DVCacheTarget
-
What
deletedrops to empty a store: every key and every tag.