i know that im doing a mistake here coz i cant run the project im trying to build and also what im trying to do here is to get a parsed data from an xml then save it into a an nsdata and then put all those data into a cache so when i run my project it doesnt always load for the data.
@implementation ViewController
{
NSCache *myCache;
}
- (void)viewDidLoad
{
myCache = [[NSCache alloc] init];
}
//saving data into cache
NSString *imageURL = [currentData.imageLink];
NSURL *url = [NSURL URLWithString:imageURL];
NSData *data = [NSData dataWithContentsOfURL:url];
data = [imagesCache objectForKey:@"KEY"];
[imagesCache setObject:imageLinks forKey:@"KEY"];