CacheConfig class

缓存配置

Constructors

CacheConfig({Duration? expirationTime, bool forceRefresh = false, bool useCacheWhenOffline = true, int priority = 5})

Properties

expirationTime Duration?
过期时间
final
forceRefresh bool
强制刷新
final
hashCode int
The hash code for this object.
no setterinherited
priority int
优先级(0-10,数值越大优先级越高)
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
useCacheWhenOffline bool
离线时使用缓存
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

Static Properties

noCache CacheConfig
不使用缓存
getter/setter pair

Static Methods

highPriority(Duration expiration) CacheConfig
高优先级缓存
lowPriority(Duration expiration) CacheConfig
低优先级缓存
withExpiration(Duration expiration, {int priority = 5}) CacheConfig
带过期时间的缓存