MemoryLruGcSettings constructor

MemoryLruGcSettings({
  1. int sizeBytes = Settings.defaultCacheSizeBytes,
})

sizeBytes is an approximate threshold, see PersistentCacheSettings.sizeBytes for the accepted values.

Implementation

MemoryLruGcSettings({this.sizeBytes = Settings.defaultCacheSizeBytes}) {
  if (sizeBytes != Settings.cacheSizeUnlimited &&
      sizeBytes < Settings.minimumCacheBytes) {
    throw ArgumentError(
      'Cache size must be set to at least ${Settings.minimumCacheBytes} bytes',
    );
  }
}