maxSizeBytes property

int get maxSizeBytes

Maximum size of entries to store in the cache in bytes.

Once more than this amount of bytes have been cached, the least-recently-used entry is evicted until there are fewer than the maximum bytes.

Implementation

int get maxSizeBytes => _maxSizeBytes;
set maxSizeBytes (int value)

Changes the maximum cache bytes.

Implementation

set maxSizeBytes(int value) {
  assert(value >= 0);
  if (value == maxSizeBytes) return;
  _maxSizeBytes = value;
  if (maxSizeBytes == 0) {
    clear();
  } else {
    _checkCacheSize();
  }
}