Cache class

Constructors

Cache()

Properties

cacheDrivers ↔ Map<String, CacheDriverInterface>
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

flush() → Future<void>
remove all cache
forever(String key, String value) → Future<void>
set key => value to cache forever
forget(String key) → Future<void>
remove a key from cache
get(String key) → Future
get a value from cache
has(String key) → Future<bool>
get a value exist
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
put(String key, String value, {Duration? duration}) → Future<void>
set key => value to cache default duration is 1 hour
store(String store) → Cache
Set where to store the cache. The name you set in the cache drivers configuration Example drivers => {'file' : FileCacheDriver()}, then store name is file
tag(String name) → Cache
set tag for the cache This is the categorize the cache and useful when you want to flush only specific tag
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited