I am using the Fresco library.
I can't find any related info in the Fresco documentation, how can I get an image file from Fresco's disk cache?
I am using the Fresco library.
I can't find any related info in the Fresco documentation, how can I get an image file from Fresco's disk cache?
I think you should never try to get Fresco Cache name cause cache is the internal implement.
But if you want to know whether a image has been cached, you can use this:
this method is return very fast, you can use it in UI thread.
if the image have download in cache,you can do it like:
I hope this helps
Check Plamenkos answer on this link.. https://github.com/facebook/fresco/issues/80
if you ask pipeline for an encoded image, and specify DISK_CACHE with ImageRequestBuilder.setLowestPermittedRequestLevel, the pipeline will return you the JPEG bytes if the image is found anywhere up to disk cache, or null if the image is not found and a full-fetch would have to be performed.
I hope I did not mis-understand your question and provide a wrong answer.
This code:
.setLowestPermittedRequestLevel(ImageRequest.RequestLevel.DISK_CACHE)
will make fresco get your image from the disk first and then the net.