CacheStore class abstract
Abstract interface for cache storage implementations.
Implementations can use different storage backends such as:
- In-memory (Map-based)
- Hive (persistent local storage)
- SharedPreferences (simple persistent storage)
- Custom implementations (Redis, SQLite, etc.)
All implementations must handle:
- Thread-safe operations (if applicable)
- Automatic expiration of TTL-based entries
- Efficient key-based lookups
- Implementers
Constructors
Properties
Methods
-
clear(
) → void - Clears all entries from the cache.
-
contains(
String key) → bool - Checks if a key exists in the cache and is not expired.
-
delete(
String key) → void - Deletes a cache entry by its key.
-
evictExpired(
) → void - Removes all expired entries from the cache.
-
get(
String key) → CacheEntry? - Retrieves a cache entry by its key.
-
getAll(
) → Map< String, CacheEntry> - Returns all cache entries as a map.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
set(
String key, CacheEntry entry) → void - Stores a cache entry with the given key.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited