Search code examples
androidcachingmemorypicasso

Clear Cache memory of Picasso


I'm trying to clear the cache memory of Picasso via Android coding.

Can anyone please help me in this issue..?

I have tried using the following code, but this was not useful in my case:

Picasso.with(getActivity()).load(data.get(pos).getFeed_thumb_image()).skipMemoryCache().into(image);

Solution

  • if you are trying to load an image through Json(from db) try clearing the networkCache for a better result.

    Picasso.with(context).load(uri).networkPolicy(NetworkPolicy.NO_CACHE)
            .memoryPolicy(MemoryPolicy.NO_CACHE)
            .placeholder(R.drawable.bv_logo_default).stableKey(id)
            .into(viewImage_imageView);