Android picasso cache images
10,758
Picasso automatically caches the loaded images, So that next time they will be loaded from the cache. You can check whether the image is loaded from the web, cache or disk by enabling the indicator
setIndicatorsEnabled(true)
Indicators will be shown for each image, specifying where the image is loaded from.
I got the reference from here
Author by
ask110593
Updated on June 12, 2022Comments
-
ask110593 about 2 years
In documentation in written that picasso caches images downloaded , but i havent seen an example how to call that image again from cache.
Here i first time load the image :
Picasso.with(getActivity()) .load(thirdArticle.getImageURL()) .resize(200, 150) .centerCrop() .into(mainThreeArticleImage);
Second time when i call same code above it shouldnt get from cache ???
If not, how to call cached images by that url ??
-
ask110593 about 9 yearsso what i should add to the code above in order it to get from cache or download via web url ??
-
Kartheek about 9 yearsYou don't need to do anything it will handle itself. That line is to know where the image is loaded from.
-
Kartheek about 9 yearsthere is no need to worry about that cache it will handle internally.