fresco icon indicating copy to clipboard operation
fresco copied to clipboard

One Picture with many url, how to cache it?

Open minetsh opened this issue 11 years ago • 1 comments

My app's picture may have many different url, such as need a signature to append after the url of the picture, so the same picture have different url.

minetsh avatar Nov 30 '15 10:11 minetsh

Extend DefaultCacheKeyFactory, override getCacheKeySourceUri and return a new normalized Uri. If I understand correctly, in your case normalization would be something like removing a signature from the end of the Uri. Then build ImagePipelineConfig with your cache key factory (just set it with setCacheKeyFactory) and pass that config to Fresco initialization as explained in the documentation.

plamenko avatar Nov 30 '15 14:11 plamenko