samedi 21 février 2015

How can I avoid repeated network requests with Picasso?

When I use Picasso in different activities and monitor network requests, what I see is that the first activity creates a network request for image A. Before image A is loaded the user may tap somewhere and open a second activity which also loads image A. Now I see a second network request has been opened to fetch A again, which means downloading twice the same image.


Is there any way to tell Picasso to instead wait for the first request to complete and reuse its results to avoid consuming bandwidth?


Aucun commentaire:

Enregistrer un commentaire