Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android delete some pictures from cache Picasso

I am using Picasso to save a collection of pictures for offline viewing. Later I need to remove some pictures manually from the cache. I can delete all files from folder, but I don't need this. I need to delete 2 or 3 files from the cache. invalidate doesn't work for me. Can anyone help me?

like image 308
d0pestar Avatar asked Nov 10 '22 11:11

d0pestar


1 Answers

You can clear in-memory cache in Picasso only per image:

Picasso.with(context).invalidate(imagePath);

Removing all cache is somewhat tricky and described here.

File cache is delegated to HTTP Client, so it's not possible to clear it from Picasso. For more information refer this answer.

like image 180
Kartheek Avatar answered Nov 15 '22 13:11

Kartheek