docs: private static boolean isValidCacheDirectory(File file) {
          return !((file == null) || (!file.exists() && !file.mkdirs()) || !file.isDirectory() || !file.canRead()
                  || !file.canWrite());
      }