@NonNull
    public Builder setNetworkCacheDir(@NonNull final File file) {
      if (cacheProvider != null) {
        throw new IllegalStateException("There is already a cache provider!");
      }
      cacheProvider = new LottieNetworkCacheProvider() {
        @Override @NonNull public File getCacheDir() {
          if (!file.isDirectory()) {
            throw new IllegalArgumentException("cache file must be a directory");
          }
          return file;
        }
      };
      return this;
    }
Provide your own network cache directory. By default, animations will be saved in your application's cacheDir/lottie_network_cache.

@see #setNetworkCacheProvider(LottieNetworkCacheProvider)
lottie/src/main/java/com/airbnb/lottie/LottieConfig.java