Lottie is supported and developed on nights and weekends. Issues from Lottie sponsors will be prioritized.
Is your feature request related to a problem? Please describe.
In scenarios where Lottie animations are fetched from a URL and cached in the network cache for efficient loading, developers may encounter a consideration with the current implementation of the clearCache() method in LottieCompositionFactory. For example, during app startup, when a large Lottie animation is displayed on the splash screen, it gets cached in both the composition cache and the network cache. However, as this animation is typically only shown once and not reused during the app's lifecycle, there's an opportunity to optimize cache management.
Describe the solution you'd like
A solution would be to extend clearCache() with an additional parameter that allows developers to specify whether they want to exclude the clearing of the network cache. By doing so, developers can selectively clear the composition cache while preserving the network cache for animations fetched from URLs.
Describe alternatives you've considered
I can’t think of another solution.
Lottie is supported and developed on nights and weekends. Issues from Lottie sponsors will be prioritized.
Is your feature request related to a problem? Please describe. In scenarios where Lottie animations are fetched from a URL and cached in the network cache for efficient loading, developers may encounter a consideration with the current implementation of the
clearCache()
method inLottieCompositionFactory
. For example, during app startup, when a large Lottie animation is displayed on the splash screen, it gets cached in both the composition cache and the network cache. However, as this animation is typically only shown once and not reused during the app's lifecycle, there's an opportunity to optimize cache management.Describe the solution you'd like A solution would be to extend
clearCache()
with an additional parameter that allows developers to specify whether they want to exclude the clearing of the network cache. By doing so, developers can selectively clear the composition cache while preserving the network cache for animations fetched from URLs.Describe alternatives you've considered I can’t think of another solution.
Additional context Not applicable.