MiniProgramCachePolicy class
- Annotations
Constructors
-
MiniProgramCachePolicy({bool enabled = true, Duration memoryTtl = const Duration(hours: 2), Duration dataTtl = const Duration(days: 30), Duration imageTtl = const Duration(days: 14), Duration audioTtl = const Duration(hours: 6), Duration videoTtl = const Duration(hours: 6), Duration stateInactiveTtl = const Duration(days: 60), Duration sessionInactiveTtl = const Duration(days: 60), int maxBytes = 20 * 1024 * 1024, int maxDataBytes = 10 * 1024 * 1024, int maxImageBytes = 20 * 1024 * 1024, int maxAudioBytes = 20 * 1024 * 1024, int maxVideoBytes = 50 * 1024 * 1024, int maxSessionBytes = 512 * 1024, int maxStateBytes = 5 * 1024 * 1024, Set<
MiniProgramCacheBucket> allowedMiniProgramCacheBuckets = _defaultMiniProgramCacheBuckets, bool clearMemoryOnExit = true, bool clearExpiredOnStartup = true, bool clearSessionOnLogout = true, bool clearStateOnInactiveExpiry = true, bool clearWhenOverLimit = true}) -
const
Properties
-
allowedMiniProgramCacheBuckets
→ Set<
MiniProgramCacheBucket> -
final
- audioTtl → Duration
-
final
- clearExpiredOnStartup → bool
-
final
- clearMemoryOnExit → bool
-
final
- clearSessionOnLogout → bool
-
final
- clearStateOnInactiveExpiry → bool
-
final
- clearWhenOverLimit → bool
-
final
- dataTtl → Duration
-
final
- enabled → bool
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- imageTtl → Duration
-
final
- maxAudioBytes → int
-
final
- maxBytes → int
-
final
- maxDataBytes → int
-
final
- maxImageBytes → int
-
final
- maxSessionBytes → int
-
final
- maxStateBytes → int
-
final
- maxVideoBytes → int
-
final
- memoryTtl → Duration
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sessionInactiveTtl → Duration
-
final
- stateInactiveTtl → Duration
-
final
- videoTtl → Duration
-
final
Methods
-
allowsMiniProgramBucket(
MiniProgramCacheBucket bucket) → bool -
maxBytesFor(
MiniProgramCacheBucket bucket) → int? -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
ttlFor(
MiniProgramCacheBucket bucket) → Duration
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited