我想标题说明了一切。我试过:

imageLoader.getMemoryCache().get(key);

以图像uri为键,但始终返回null
尽管我在配置中启用了缓存。

最佳答案

使用MemoryCacheUtils

MemoryCacheUtils.findCachedBitmapsForImageUri(imageUri, ImageLoader.getInstance().getMemoryCache());

内存缓存可以包含一个图像的多个位图(不同大小)。所以内存缓存使用特殊的键,而不是图像url。

08-03 18:30