maxCachedResponseTtl property

Duration get maxCachedResponseTtl

The maximum TTL accepted for responses received by this connection.

Changing the value discards stored responses. Zero disables the cache. The default is 24 hours.

Implementation

Duration get maxCachedResponseTtl => _responseCache.maxTtl;
set maxCachedResponseTtl (Duration value)

Implementation

set maxCachedResponseTtl(Duration value) {
  if (value.isNegative) {
    throw ArgumentError.value(value, 'maxCachedResponseTtl');
  }
  if (_responseCache.maxTtl == value) return;
  _responseCache.maxTtl = value;
  _responseCache._entries.clear();
}