I use SDWebImage to cache images in my application, however, I recently encountered a problem where the images that should be stored in the cache continue to be updated. Looking at it, I found that the full URL of the image from AWS is actually changing due to parameters tied to the end of the URL. Each time I retrieve an object containing the image URL, the image URL is returned with the dynamic parameter “signature” and “expire” (for security purposes). Another url in relation to the image cache, but pay attention to the same image path.
First sample:
https://myapp.s3.amazonaws.com/path/image123.jpeg?AWSAccessKeyId=SOMEKEY&Signature=vrUFlMFEQ9fqQ%3D&Expires=1441702633
Enter another 1 second again:
https://myapp.s3.amazonaws.com/path/image123.jpeg?AWSAccessKeyId=SOMEKEY&Signature=2mcMxUJLyJd7E%3D&Expires=1441703105
What is the best way to deal with this situation? Of course, it would be great if SDWebImage had the ability to ignore request parameters outside the file path.
ios caching amazon-s3 sdwebimage
Kyle clegg
source share