Skip to content

Commit

Permalink
Add LottieConfig.Builder.setEnableNetworkCache() docs (#211)
Browse files Browse the repository at this point in the history
Add docs to support disabling Lottie's internal network cache, see airbnb/lottie-android#2158
  • Loading branch information
viakunin authored Nov 14, 2022
1 parent 4d3c697 commit 6f198ac
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion android.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,10 @@ If you fire multiple animation requests for the same animation in parallel such
---
# Global Configuration
Lottie has some global configuration options. None are required by default but it can be used to:
* Use your own network stack intead of Lottie's built in one when loading animations from the network.
* Use your own network stack instead of Lottie's built in one when loading animations from the network.
* Provide your own cache directories for animation fetched from the network instead of using Lottie's default one (`cacheDir/lottie_network_cache`).
* Enable systrace makers for debugging.
* Disable Lottie's network cache completely if you want to implement custom network fetcher-level caching strategy.

To set it up, somewhere during your application initialization, include:
```kotlin
Expand All @@ -84,6 +85,7 @@ Lottie.initialize(
.setEnableSystraceMarkers(true)
.setNetworkFetcher(...)
.setNetworkCacheDir(...)
.setEnableNetworkCache(false)
)
```

Expand Down

0 comments on commit 6f198ac

Please # to comment.