CacheManager class

The Cache Manager.

This service acts as a manager for various cache drivers. It resolves the active driver based on configuration and proxies calls to it.

Implemented types
Implementers

Constructors

CacheManager()

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

driver([String? driver]) → CacheStore
Get a cache driver instance.
flush() → Future<void>
Remove all items from the cache.
override
forget(String key) → Future<void>
Remove an item from the cache.
override
get(String key, {dynamic defaultValue}) → dynamic
Retrieve an item from the cache by key.
override
has(String key) → bool
Determine if an item exists in the cache.
override
init() → Future<void>
Initialize the driver (optional async setup).
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
put(String key, dynamic value, {Duration? ttl}) → Future<void>
Store an item in the cache for a given number of seconds.
override
toString() → String
A string representation of this object.
inherited

Operators

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