Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Store images in picasso with a cache key of our own

Is there a way I can load images into Picasso's image cache by specifying the cache key that is used ?

On a side note if that is not possible, I have made the necessary changes but I am not sure how to rebuild the jar. Any instructions to rebuild Picasso are much appreciated.

like image 651
LostPuppy Avatar asked Sep 29 '22 21:09

LostPuppy


1 Answers

You can call stableKey on your requestCreator object.

https://square.github.io/picasso/2.x/picasso/com/squareup/picasso/RequestCreator.html#stableKey-java.lang.String-

It will be like: Picasso.with(context).load(yourURL).stableKey(yourKey).into(textView);

like image 193
gugarush Avatar answered Oct 03 '22 02:10

gugarush