Picasso caching images for android

The documentation says that picasso caches uploaded images, but I haven't seen an example of how to call that image from the cache again.

This is where I first load the image:

Picasso.with(getActivity())
        .load(thirdArticle.getImageURL())
        .resize(200, 150)
        .centerCrop()
        .into(mainThreeArticleImage);

      

Second time when I call the same code above it shouldn't get from cache ???

If not, how do I call the cached images using this url?

+3


source to share


1 answer


Picasso will automatically cache the downloaded images, so next time they will be loaded from the cache. You can check if the image is downloaded from internet, cache or disk by turning on the indicator

setIndicatorsEnabled(true)

      



enter image description here

Indicators will be displayed for each image, indicating where the image is loaded from.
I got link from here

+6


source







All Articles