I am using the SDWebImage library to handle the image cache. I applied one of the methods to download the image from the server and fill the data in tableView. Here is my code to upload the image and readings in tableViewCell
B. cellForRowAtIndexPathI made the following code
[cell.profileImageView sd_setImageWithURL:[NSURL URLWithString:url] placeholderImage:nil options:SDWebImageRefreshCached];
It works great here. But when I updated the image on the server, tableViewCellit still shows the same image. The problem is that his cache does not update the image. I searched for the same keywords and came across this StackOverflow question. But to solve this problem failed. I also tried to clear the memory and cache onviewDidDisappear
-(void)viewDidDisappear:(BOOL)animated
{
[super viewDidDisappear:YES];
[[SDImageCache sharedImageCache]clearMemory];
[[SDImageCache sharedImageCache]clearDisk];
}
But this is not an effective way. Is there any other way to update the cache when updating the image on the server?