-
-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't use url for cache key #5
Comments
Or alternatively, could the cache get some sort of time-out? After a day in the cache, always get the latest version of the image. |
For now I've solved my problem by putting ?uid={news_id} after the image url. |
You should use common HTTP cache busting technique where the image URL change whenever then image's content change. For instance you can put the image timestamp in the query-string of the image URL. This way you will invalidate the cache of SDWebImage as well as all intermediate caches. You would also be able to set long living HTTP cacheability to you image in order to benefit from intermediate proxy caches. |
Hi,
Great library, I use it often. I have discovered a problem in one of my apps: some images changed on the website, but still use the same URL. Because the image cache uses that url (which didn't change), the user always sees the same old image.
Would it be possible to either use some sort of md5 hash for the cache key? Or something like this, where I can set a different cache key?
With something like this, it would download the new image for a new news item, even if the image url would've been "re-used" on the site.
The text was updated successfully, but these errors were encountered: