CacheMode enum

缓存策略枚举

Inheritance
Available extensions

Values

memory → const CacheMode

仅内存缓存(App 重启后丢失)

persistent → const CacheMode

仅持久化缓存(SharedPreferences)

hybrid → const CacheMode

混合模式:内存 + 持久化

  • 读取:先查内存,miss 则查磁盘并加载到内存
  • 写入:同时写入内存和磁盘

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
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

Constants

values → const List<CacheMode>
A constant List of the values in this enum, in order of their declaration.