I'm loading my images in my UICollectionView with UIImageView+WebCache
category. I'm using the option SDWebImageRefreshCached
:
[cell.imageView
setImageWithURL:url
placeholderImage:nil
options:SDWebImageRefreshCached | SDWebImageRetryFailed
completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType)
{
if (error) NSLog(@"Error loading image");
}
The Cache-Control of the image is public, max-age=604772
. If I activate the airplane mode, I get the "Error loading image" message.
Why is SDWebImage trying to connect the web server every time, although the max-age is set to 1 week?