public void clear() {
    File parentDir = parentDir();
    if (parentDir.exists()) {
      File[] files = parentDir.listFiles();
      if (files != null && files.length > 0) {
        for (File file : files) {
          file.delete();
        }
      }
      parentDir.delete();
    }
  }
Helper class to save and restore animations fetched from an URL to the app disk cache.
lottie/src/main/java/com/airbnb/lottie/network/NetworkCache.java