Closed LuciferTian2010 closed 1 year ago
Yes, you can use LottieCompositionFactory.fromUrl with your own cacheKey
Sorry I am new to Lottie, how does cacheKey used to generate the filename? From what I learn this cacheKey looks like used for memory cache not disk cache?
Also I narrow down to this function (https://github.com/airbnb/lottie-android/blob/master/lottie/src/main/java/com/airbnb/lottie/network/NetworkCache.java#L159) that generates the filename based on the url. And it looks like the function you mention would still use NetworkFetcher and NetworkFetcher uses NetworkCache which seems not resolve my problem?
Lottie is supported and developed on nights and weekends. Issues from Lottie sponsors will be prioritized.
If you don't use this template, your issue will be closed. Delete this text once completed.
Checklist
Checklist
Describe the bug I have some Lottie files whose network uris are passed to
LottieAnimationView.setAnimationFromUrl
. Sometimes I see Lottie reports failure the error that "ENAMETOOLONG (File name too long)". The cache filenames seems generated based on the network uri. It is hard for us to shorten the network url for security purpose, so I am wondering if I can customize the way that Lottie uses to generate the filename of the cache file.What version of Lottie did you test this on? 6.0.0
What version of Android did you test this on? Android 11
Steps To Reproduce n/a
Screenshots