Glide not updating image android of same url?(Glide 不更新相同 url 的图像 android?)
问题描述
我有一个图片相同的网址.当我多次更新此图像时,它会显示上一个图像.服务器上的图片和图片版本已更新,但 Glide 没有显示新图片.我想每次都获取新图片并缓存它.
I have the same url for an image. When I update this image more than one time it shows the previous image. The image and picture version on the server is updated but Glide is not showing the new image.I want to get new image every time and cache it .
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 次尝试更改图像后保持不变
I can reproduce this bug by changing internet ,on one internet its change image as expected on other internet it remain same after 2 or 3 tries to changing image
推荐答案
//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);
这篇关于Glide 不更新相同 url 的图像 android?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Glide 不更新相同 url 的图像 android?
基础教程推荐
- 问题http://apache.org/xml/features/xinclude测试日志4j 2 2022-01-01
- Spring AOP错误无法懒惰地为此建议构建thisJoinPoin 2022-09-13
- REST Web 服务返回 415 - 不支持的媒体类型 2022-01-01
- 无法复制:“比较方法违反了它的一般约定!" 2022-01-01
- 修改 void 函数的输入参数,然后读取 2022-01-01
- 使用堆栈算法进行括号/括号匹配 2022-01-01
- RabbitMQ:消息保持“未确认"; 2022-01-01
- Struts2 URL 无法访问 2022-01-01
- 如何对 Java Hashmap 中的值求和 2022-01-01
- 存储 20 位数字的数据类型 2022-01-01
