Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
160d92e3
Unverified
Commit
160d92e3
authored
Jul 10, 2018
by
liyuqian
Committed by
GitHub
Jul 10, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Increase image cache to 100MB (#19220)
This should fix #18952 and #813
parent
59d6527f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
image_cache.dart
packages/flutter/lib/src/painting/image_cache.dart
+9
-9
No files found.
packages/flutter/lib/src/painting/image_cache.dart
View file @
160d92e3
...
...
@@ -5,18 +5,18 @@
import
'image_stream.dart'
;
const
int
_kDefaultSize
=
1000
;
const
int
_kDefaultSizeBytes
=
10
485760
;
// 1
0 MiB
const
int
_kDefaultSizeBytes
=
10
0
<<
20
;
// 10
0 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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment