fresco
fresco copied to clipboard
One Picture with many url, how to cache it?
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.
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.