DioCacheConfig class

作者: lixp 创建时间: 2022/11/22 14:46 类介绍:Dio缓存二次封装配置类

Constructors

DioCacheConfig({Duration maxAge = const Duration(days: 7), Duration? maxStale, String? primaryKey, String? subKey, bool? forceRefresh})

Properties

forceRefresh bool?
每次请求是否强制刷新缓存
final
hashCode int
The hash code for this object.
no setterinherited
maxAge Duration
缓存时间
final
maxStale Duration?
缓存过期时间
final
primaryKey String?
缓存标记 主键 key 默认以url为标记
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
subKey String?
缓存标记 子键key 配合分页标记使用
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