ICacheManager class abstract

Interface for the main cache facade. Defines the contract for the unified cache API.

Implementers

Constructors

ICacheManager()

Properties

allStats Map<String, CacheStats>
Gets cache statistics for all drivers.
no setter
defaultDriverName String
Gets the name of the current default driver.
no setter
driverNames List<String>
Gets all registered driver names.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stats CacheStats
Gets cache statistics.
no setter

Methods

add(String key, dynamic value, Duration ttl) Future<bool>
Stores a value in the cache if the key does not exist.
clear() Future<void>
Clears all items from the cache.
decrement(String key, [int amount = 1]) Future<int>
Decrement the value of an item in the cache.
driver([String? name]) CacheDriver
Gets a specific cache driver instance.
forever(String key, dynamic value) Future<void>
Stores a value in the cache forever.
forget(String key) Future<void>
Removes a value from the cache.
forgetByTag(String tag) Future<void>
Removes all cache items associated with the given tag.
get(String key) Future
Retrieves a value from the cache.
has(String key) Future<bool>
Checks if a key exists in the cache.
increment(String key, [int amount = 1]) Future<int>
Increment the value of an item in the cache.
many(List<String> keys) Future<Map<String, dynamic>>
Retrieves multiple values from the cache by their keys.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pull(String key) Future
Retrieve an item from the cache and delete it.
put(String key, dynamic value, Duration ttl) Future<void>
Stores a value in the cache.
putMany(Map<String, dynamic> values, Duration ttl) Future<void>
Stores multiple values in the cache.
remember(String key, Duration ttl, Future callback()) Future
Retrieves a value or stores the default value if it doesn't exist.
store(String name) CacheDriver
Get a cache store instance by name.
tag(String key, List<String> tags) Future<void>
Tags a cache item with one or more tags.
toString() String
A string representation of this object.
inherited

Operators

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