Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to exclude network cache from LottieCompositionFactory.clearCache() #2498

Open
savvaspit opened this issue Apr 29, 2024 · 0 comments
Open

Comments

@savvaspit
Copy link

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.

Additional context
Not applicable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant