public boolean isDiskCacheEnabled() {
    int mask = CachesLocationsMasks.DISK_READ | CachesLocationsMasks.DISK_WRITE;
    return ((mCachesDisabled & mask) == 0)
        && (UriUtil.isNetworkUri(mSourceUri) || isCustomNetworkUri(mSourceUri));
  }
Returns whether the use of the disk cache is enabled, which is partly dependent on the URI.
imagepipeline/src/main/java/com/facebook/imagepipeline/request/ImageRequestBuilder.java