Android 清除位图缓存-koush-ion

Android 清除位图缓存-koush-ion,android,caching,bitmap,ion-koush,Android,Caching,Bitmap,Ion Koush,我想清除位图缓存,但不确定如何清除位图。 我正在使用Koush Ion库加载图片 try { bitmap = Ion.with(context).load(URLimage).withBitmap().asBitmap().get(); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrac

我想清除位图缓存,但不确定如何清除位图。 我正在使用Koush Ion库加载图片

try {
            bitmap = Ion.with(context).load(URLimage).withBitmap().asBitmap().get();
        } catch (InterruptedException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (ExecutionException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
每次单击按钮时,我都需要清除位图缓存。
提前感谢

试试这可能会有帮助,我用这段代码来清除我的网络数据缓存

Ion.getDefault(上下文).configure().getResponseCache().clear()

使用
Ion.getDefault(上下文).getCache().clear()清除文件缓存

使用
Ion.getDefault(context).getBitmapCache().clear()
清除内存中的位图缓存

有关各个方法的来源,请参见:

Ion.dump()
将不会清除缓存。它只需将一些调试信息打印到日志中。您也可以查找它的源代码