Increase LruCache capability to 512 MB

This commit is contained in:
tarsin committed 2022-12-09 18:10:42 +08:00
1 parent 069d7e2382
commit f76fece81d
1 file changed
+2 -3
@@ -237,11 +237,10 @@ public abstract class GalleryProvider {
private static class ImageCache extends LruCache<Integer, ImageWrapper> {
private static final long MAX_CACHE_SIZE = 128 * 1024 * 1024;
private static final long MIN_CACHE_SIZE = 32 * 1024 * 1024;
private static final int CACHE_SIZE = 512 * 1024 * 1024;
public ImageCache() {
super((int) MathUtils.clamp(OSUtils.getTotalMemory() / 16, MIN_CACHE_SIZE, MAX_CACHE_SIZE));
super(CACHE_SIZE);
}
public void add(Integer key, ImageWrapper value) {