caching images in collectionViewCell in Swift?
I have images in my collectionViewCell's that are fetched and parsed via NSURLRequest, how do I cache these images so they don't have to start a new request with every single appearance/disappearance of the view? here is my code that fetches the images: class funnyPicture: NSObject { var pfPicture : PFObject var coverImage : UIImage! init(pfPicture: PFObject) { self.pfPicture = pfPicture } func fetchCoverImage(completion: (image: UIImage?, error: NSError?) -> Void) { let urlString = self.pfPicture["funnyPictures"] as! String let url = NSURL(string: urlString) let request = NSURLRequest(URL: