 
         let request = Request(avatar: avatar, completion: completion)
 
-        let key = request.key
-
-        if let image = sharedInstance.cache.object(forKey: key) as? UIImage {
-            completion(finished: true, image: image, cacheType: .memory)
+        if let image = sharedInstance.cache.object(forKey: request.key as NSString) {
+            completion(true, image, .memory)
 
         } else {
             if let placeholderImage = avatar.placeholderImage {

            request.completion(true, styledImage, cacheType)
        }

        cache.setObject(styledImage, forKey: request.key)
    }

    fileprivate func completeRequestsWithURL(_ URL: Foundation.URL, image: UIImage, cacheType: CacheType) {


                    // if can find styledImage in cache, no need to generate it again or save

                    if let styledImage = self.cache.object(forKey: request.key as NSString) {
                        self.completeRequest(request, withStyledImage: styledImage, cacheType: cacheType)

                    } else {
