             return (operation, request)
         }
         set {
-            objc_setAssociatedObject(self, &AssociatedKeys.RequestImageOperation, newValue.operation, UInt(OBJC_ASSOCIATION_RETAIN_NONATOMIC))
-            objc_setAssociatedObject(self, &AssociatedKeys.URLRequestImage, newValue.request, UInt(OBJC_ASSOCIATION_RETAIN_NONATOMIC))
+            objc_setAssociatedObject(self, &AssociatedKeys.RequestImageOperation, newValue.operation, .OBJC_ASSOCIATION_RETAIN_NONATOMIC)
+            objc_setAssociatedObject(self, &AssociatedKeys.URLRequestImage, newValue.request, .OBJC_ASSOCIATION_RETAIN_NONATOMIC)
         }
     }
     

}

func AFImageCacheKeyFromURLRequest(request:NSURLRequest) -> String {
    return request.URL!.absoluteString!
}

class AFImageCache: NSCache, AFImageCacheProtocol {

        
        self.af_requestImageOperation = (NSBlockOperation(block: { () -> Void in
            var response:NSURLResponse?
            do {
                let data = try NSURLConnection.sendSynchronousRequest(request, returningResponse: &response)
                dispatch_async(dispatch_get_main_queue(), { () -> Void in
                    if request.URL!.isEqual(self.af_requestImageOperation.request?.URL) {
                        let image:UIImage? = UIImage(data: data)
                        if image != nil {
                            if success != nil {
                                success!(request: request, response: response, image: image!, fromCache:false)
                            }
                            else {
                                self.image = image!
                            }
                            UIImageView.sharedImageCache().cacheImage(image!, forRequest: request)
                        }
                        
                        self.af_requestImageOperation = (nil, nil)
                    }
                })
            }
            catch {
                if failure != nil {
                    failure!(request: request, response:response, error: error as NSError)
                }
            }
        }), request: request)
        
        UIImageView.af_sharedImageRequestOperationQueue().addOperation(self.af_requestImageOperation.operation!)
    }
