Parthiban M Parthiban M - 6 months ago 216
Android Question

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

Answer

Use this instead :

 Picasso.with(getContext()).load(data.get(pos).getFeed_thumb_image()).memoryPolicy(MemoryPolicy.NO_CACHE).into(image);
Comments