无效缓存毕加索 [英] Invalidate cache in Picasso

查看:235
本文介绍了无效缓存毕加索的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从盘使用毕加索,例如, Picasso.with(CTX)加载图像。负载(新的文件(/路径/要/图像))。到(ImageView的),但每当我保存新的图像在该文件中,并刷新我的 ImageView的,毕加索仍然有位图缓存。

I load an image from disk using Picasso, e.g., Picasso.with(ctx).load(new File("/path/to/image")).into(imageView), but whenever I save a new image in that file, and refresh my ImageView, Picasso still has the bitmap cached.

是否有可能使缓存失效毕加索?

Is it possible to invalidate the cache in Picasso?

推荐答案

在毕加索的最新版本,对于无效的新方法,没有任何解决方法,所以我认为前面提到的自定义PicassoTools类,现在已经过时这种情况下,

In the recent versions of Picasso, there is a new method for invalidate, without any workarounds, so I think that custom PicassoTools class mentioned earlier, is now obsolete in this case

Picasso.with(getActivity()).invalidate(file);

这篇关于无效缓存毕加索的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆