CacheOptions class
Cache options
Constructors
-
CacheOptions.new({int? maxAgeSeconds, List<
CacheLevel> levels = const [CacheLevel.memory, CacheLevel.disk], bool compress = true, Map<String, dynamic> additionalMetadata = const {}}) -
Creates new CacheOptions
const
- CacheOptions.longLived()
-
Creates CacheOptions for long-lived cache entries
factory
- CacheOptions.mediumLived()
-
Creates CacheOptions for medium-lived cache entries
factory
- CacheOptions.permanent()
-
Creates CacheOptions for permanent cache entries
factory
- CacheOptions.shortLived()
-
Creates CacheOptions 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
-
levels
→ List<
CacheLevel> -
The cache levels to use
final
- maxAgeSeconds → int?
-
The maximum age of cache entries in seconds
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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