private void writeTransformedToCache(Resource<T> transformed) {
        if (transformed == null || !diskCacheStrategy.cacheResult()) {
            return;
        }
        long startTime = LogTime.getLogTime();
        SourceWriter<Resource<T>> writer = new SourceWriter<Resource<T>>(loadProvider.getEncoder(), transformed);
        diskCacheProvider.getDiskCache().put(resultKey, writer);
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            logWithTimeAndKey("Wrote transformed from source to cache", startTime);
        }
    }
Returns a transformed and transcoded resource decoded from source data, or null if no source data could be
obtained or no resource could be decoded.

<p>
    Depending on the {@link DiskCacheStrategy} used, source data is either decoded
    directly or first written to the disk cache and then decoded from the disk cache.
</p>

@throws Exception
core/src/main/java/com/bumptech/glide/load/engine/DecodeJob.java