DataCacheOptions class

Cache options for DataCacheX

Constructors

DataCacheOptions({Duration? maxAge, bool compress = true, Map<String, dynamic> additionalMetadata = const {}, String storageType = 'both'})
Creates new DataCacheOptions
const
DataCacheOptions.longLived()
Creates DataCacheOptions for long-lived cache entries
factory
DataCacheOptions.mediumLived()
Creates DataCacheOptions for medium-lived cache entries
factory
DataCacheOptions.permanent()
Creates DataCacheOptions for permanent cache entries
factory
DataCacheOptions.shortLived()
Creates DataCacheOptions for short-lived cache entries
factory

Properties

additionalMetadata → Map<String, dynamic>
Additional metadata to store with the cache entry
final
compress → bool
Whether to compress the data
final
hashCode → int
The hash code for this object.
no setterinherited
maxAge → Duration?
The maximum age of cache entries in seconds
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
storageType → String
The storage type to use
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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