Skip to content

Commit

Permalink
Using cache policy
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardocallado committed Jul 15, 2014
1 parent d768b64 commit a10911d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Classes/IDMPhoto.m
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@ - (void)loadUnderlyingImageAndNotify {
[self performSelectorInBackground:@selector(loadImageFromFileAsync) withObject:nil];
} else if (_photoURL) {
// Load async from web (using AFNetworking)
NSURLRequest *request = [NSURLRequest requestWithURL:_photoURL];
NSURLRequest *request = [[NSURLRequest alloc] initWithURL:_photoURL
cachePolicy:NSURLRequestReturnCacheDataElseLoad
timeoutInterval:0];

AFHTTPRequestOperation *op = [[AFHTTPRequestOperation alloc] initWithRequest:request];
op.responseSerializer = [AFImageResponseSerializer serializer];
Expand Down

0 comments on commit a10911d

Please sign in to comment.