     private func fetchFromDiskCache(diskCache : DiskCache, key : String, memoryCache : NSCache,  success doSuccess : (T) -> (), failure doFailure : ((NSError?) -> ())?) {
         diskCache.fetchData(key, success: { data in
             dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), {
-                let result = T.convertFromData(data)
-                // TODO: Decompress image
-                // let decompressedImage = image.hnk_decompressedImage()
-                if let result = result {
+                var value = T.convertFromData(data)
+                if let value = value {
+                    let descompressedValue = self.decompressedImageIfNeeded(value)
                     dispatch_async(dispatch_get_main_queue(), {
-                        doSuccess(result)
-                        let wrapper = ObjectWrapper(value: result)
+                        doSuccess(descompressedValue)
+                        let wrapper = ObjectWrapper(value: descompressedValue)
                         memoryCache.setObject(wrapper, forKey: key)
                     })
                 }

        fetcher.fetchWithSuccess(success: { value in
            dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), {
                var formatted = format.apply(value)
                // if (formatted == result) {
                    // TODO: formattedImage = image.hnk_decompressedImage()
                // }
                dispatch_async(dispatch_get_main_queue(), {
                    doSuccess(formatted)
                    self.setValue(formatted, fetcher.key, formatName: format.name)

//  Copyright (c) 2014 Haneke. All rights reserved.
//

import UIKit

// Used to add T to NSCache
