@Override
    public DiskCache build() {
        File cacheDir = cacheDirectoryGetter.getCacheDirectory();

        if (cacheDir == null) {
            return null;
        }

        if (!cacheDir.mkdirs() && (!cacheDir.exists() || !cacheDir.isDirectory())) {
            return null;
        }

        return DiskLruCacheWrapper.get(cacheDir, diskCacheSize);
    }
When using this constructor {@link CacheDirectoryGetter#getCacheDirectory()} will be called out of UI thread,
allowing to do I/O access without performance impacts.

@param cacheDirectoryGetter Interface called out of UI thread to get the cache folder.
@param diskCacheSize        Desired max bytes size for the LRU disk cache.
core/src/main/java/com/bumptech/glide/load/engine/cache/DiskLruCacheFactory.java