I've been having trouble getting my SDWebImage cache to update when an image is updated on my firebase storage backend. As suggested in other answers I've read here on stack exchange I've implemented .refreshCached
but still the same image seems to be loaded after the server has been updated. To confirm that it is a cache problem I have tested downloading the image uncached and have received the correct results. Any ideas of what I could be doing wrong or a better caching library. Thank you!
I understand that the problem stems from updating the same URL that is cached but is there a way to detect when the data has been changed on the server.
SDWebImage, Swift: SDWebImageRefreshCached unresolved identifier
How to update image in cache when image changed on server with SDWebImage
Firebase Storage Tutorial Using sd_setImage
My Implementation
self.userProfileImage.sd_setImage(with: URL(string: user.photoURL), placeholderImage: placeHolder, options: SDWebImageOptions.refreshCached, completed: {image,error,imageCacheType,storageRef in
if let error = error{
print("Error during initial cache load 1: \(error)")
}
})