slidingExpiration property
Duration?
get
slidingExpiration
Gets or sets how long a cache entry can be inactive (not accessed) before it will be removed. This will not extend the entry lifetime beyond the absolute expiration (if set).
Implementation
Duration? get slidingExpiration => _slidingExpiration;
set
slidingExpiration
(Duration? value)
Implementation
set slidingExpiration(Duration? value) {
_checkFrozen();
if (value != null && (value.isNegative || value == Duration.zero)) {
throw ArgumentError.value(
value,
'slidingExpiration',
'The sliding expiration value must be positive.',
);
}
_slidingExpiration = value;
}