我有一个图片相同的网址。当我多次更新此图像时,它会显示上一个图像。服务器上的图片和图片版本已更新,但 Glide 没有显示新图片。我想每次都获取新图片并缓存它。
Glide.with(context)
.load(Constants.COPY_LINK_BASE_URL + info.getDisplayPicture())
.placeholder(R.drawable.ic_profile).dontAnimate()
.diskCacheStrategy(DiskCacheStrategy.SOURCE)
.signature(new (SettingManager.getUserPictureVersion(context)))
.into(ivUserProfilePhoto);
我可以通过更改互联网来重现此错误,在一个互联网上,它的更改图像与在其他互联网上预期的一样,在 2 或 3 次尝试更改图像后保持不变
最佳答案
//Use bellow code, it work for me.Set skip Memory Cache to true. it will load the image every time.
Glide.with(Activity.this)
.load(theImagePath)
.diskCacheStrategy(DiskCacheStrategy.NONE)
.skipMemoryCache(true)
.into(myImageViewPhoto);
关于java - Glide 不更新相同 url 的图像 android?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41758087/