Invalidate cache in Picasso

Maarten picture Maarten · Feb 25, 2014 · Viewed 62.6k times · Source

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?

Answer

mes picture mes · Feb 15, 2015

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);