CacheInfoRepository class abstract
Base class for cache info repositories
- Available extensions
Constructors
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
-
close(
) → Future< bool> - Close the connection to the repository. If this is the last connection to the repository it will return true and the repository is truly closed. If there are still open connections it will return false;
-
delete(
int id) → Future< int> -
Deletes a cache object by
id
-
deleteAll(
Iterable< int> ids) → Future<int> -
Deletes items with
ids
from the repository -
deleteDataFile(
) → Future< void> - Deletes the cache data file including all cache data.
-
exists(
) → Future< bool> - Returns whether or not there is an existing data file with cache info.
-
get(
String key) → Future< CacheObject?> -
Gets a CacheObject by
key
-
getAllObjects(
) → Future< List< CacheObject> > - Gets the list of all objects in the cache
-
getObjectsOverCapacity(
int capacity) → Future< List< CacheObject> > - Gets the list of CacheObject that can be removed if the repository is over capacity.
-
getOldObjects(
Duration maxAge) → Future< List< CacheObject> > -
Returns a list of CacheObject that are older than
maxAge
-
insert(
CacheObject cacheObject, {bool setTouchedToNow = true}) → Future< CacheObject> -
Inserts
cacheObject
into the repository -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
open(
) → Future< bool> - Opens the repository, or just returns true if the repo is already open.
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
CacheObject cacheObject, {bool setTouchedToNow = true}) → Future< int> -
Updates an existing
cacheObject
-
updateOrInsert(
CacheObject cacheObject) → Future - Updates a given CacheObject, if it exists, or adds a new item to the repository
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited