CacheAdapter class abstract

An abstract class that defines the interface for cache adapters.

Cache adapters are responsible for storing and retrieving data from a specific storage mechanism. This abstract class provides a common interface for all cache adapters, allowing them to be used interchangeably.

Implementers

Constructors

CacheAdapter()

Properties

enableEncryption → bool
Indicates if encryption is enabled for this adapter.
no setter
encryptionOptions → EncryptionOptions?
Returns the encryption options for this adapter.
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

Methods

clear() → Future<void>
Clears all data from the cache.
containsKey(String key) → Future<bool>
Checks if the cache contains a value associated with the given key.
containsKeys(List<String> keys) → Future<Map<String, bool>>
Checks if the cache contains values associated with all the given keys.
delete(String key) → Future<void>
Deletes the value associated with the given key.
deleteAll(List<String> keys) → Future<void>
Deletes multiple values associated with the given keys.
deleteByTag(String tag) → Future<void>
Deletes all items in the cache that have the specified tag.
deleteByTags(List<String> tags) → Future<void>
Deletes all items in the cache that have all the specified tags.
get(String key) → Future<CacheItem?>
Retrieves the CacheItem associated with the given key.
getAll(List<String> keys) → Future<Map<String, CacheItem>>
Retrieves multiple CacheItems associated with the given keys.
getKeys({int? limit, int? offset}) → Future<List<String>>
Returns a list of all keys in the cache.
getKeysByTag(String tag, {int? limit, int? offset}) → Future<List<String>>
Returns a list of all keys in the cache that have the specified tag.
getKeysByTags(List<String> tags, {int? limit, int? offset}) → Future<List<String>>
Returns a list of all keys in the cache that have all the specified tags.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
put(String key, CacheItem value) → Future<void>
Stores a value in the cache with the given key.
putAll(Map<String, CacheItem> entries) → Future<void>
Stores multiple values in the cache with the given keys.
toString() → String
A string representation of this object.
inherited

Operators

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