@Override
    public File get(Key key) {
        String safeKey = safeKeyGenerator.getSafeKey(key);
        File result = null;
        try {
            //It is possible that the there will be a put in between these two gets. If so that shouldn't be a problem
            //because we will always put the same value at the same key so our input streams will still represent
            //the same data
            final DiskLruCache.Value value = getDiskCache().get(safeKey);
            if (value != null) {
                result = value.getFile(0);
            }
        } catch (IOException e) {
            if (Log.isLoggable(TAG, Log.WARN)) {
                Log.w(TAG, "Unable to get from disk cache", e);
            }
        }
        return result;
    }
Get a DiskCache in the given directory and size. If a disk cache has alread been created with
a different directory and/or size, it will be returned instead and the new arguments
will be ignored.

@param directory The directory for the disk cache
@param maxSize The max size for the disk cache
@return The new disk cache with the given arguments, or the current cache if one already exists
core/src/main/java/com/bumptech/glide/load/engine/cache/DiskLruCacheWrapper.java