diff --git a/packages/flutter/lib/src/painting/image_cache.dart b/packages/flutter/lib/src/painting/image_cache.dart index f008b61a6f..5f04b26d11 100644 --- a/packages/flutter/lib/src/painting/image_cache.dart +++ b/packages/flutter/lib/src/painting/image_cache.dart @@ -5,18 +5,18 @@ import 'image_stream.dart'; const int _kDefaultSize = 1000; -const int _kDefaultSizeBytes = 10485760; // 10 MiB +const int _kDefaultSizeBytes = 100 << 20; // 100 MiB /// Class for the [imageCache] object. /// -/// Implements a least-recently-used cache of up to 1000 images. The maximum -/// size can be adjusted using [maximumSize]. Images that are actively in use -/// (i.e. to which the application is holding references, either via -/// [ImageStream] objects, [ImageStreamCompleter] objects, [ImageInfo] objects, -/// or raw [dart:ui.Image] objects) may get evicted from the cache (and thus -/// need to be refetched from the network if they are referenced in the -/// [putIfAbsent] method), but the raw bits are kept in memory for as long as -/// the application is using them. +/// Implements a least-recently-used cache of up to 1000 images, and up to 100 +/// MB. The maximum size can be adjusted using [maximumSize] and +/// [maximumSizeBytes]. Images that are actively in use (i.e. to which the +/// application is holding references, either via [ImageStream] objects, +/// [ImageStreamCompleter] objects, [ImageInfo] objects, or raw [dart:ui.Image] +/// objects) may get evicted from the cache (and thus need to be refetched from +/// the network if they are referenced in the [putIfAbsent] method), but the raw +/// bits are kept in memory for as long as the application is using them. /// /// The [putIfAbsent] method is the main entry-point to the cache API. It /// returns the previously cached [ImageStreamCompleter] for the given key, if