CacheManager class
Gives named cache stores from the config. Each store is built once.
CacheManager cache = CacheManager(config);
await cache.store().put('a', 1);
await cache.store('redis').get('a');
Constructors
- CacheManager(CacheConfig config, {CacheClock clock = const CacheClock()})
Properties
- config → CacheConfig
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addStore(
String name, CacheDriver driver) → void - Add a ready driver as a store.
-
extend(
String name, CacheDriverFactory factory) → void -
Add a driver type. Stores with
'driver': nameusefactory. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
store(
[String? name]) → CacheStore -
The store with
name, or the default store. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited