[]skin加载url资源不会刷新

代码如下
 
        Laya.loader.clearRes("http://10.144.1.20:8081/files/ ... 6quot;);
        var test: Texture = Laya.loader.getRes("http://10.144.1.20:8081/files/ ... 6quot;);
        Laya.loader.load("http://10.144.1.20:8081/files/ ... ot%3B, Handler.create(this, function (): void {
            var t: Texture = Laya.loader.getRes("http://10.144.1.20:8081/files/ ... 6quot;);
            var ape: Sprite = new Sprite();
            ape.graphics.drawTexture(t, 0, 0);
            Laya.stage.addChild(ape);
            ape.pos(0, 0);
        }));
 
 
业务:
图片服务器会修改上传新的图片,图片的文件名不变
流程:
我清理了一边缓存,确认了缓存里没有资源情况下重新向url获取请求
得到的还是原来那张图片
 
请问要怎样才能刷新url请求的图片文件呢
已邀请:

joye1230

赞同来自:

我表达的不是这个意思
就是 Laya.loader.load载入服务器上照片
修改了照片......
清理了Laya.loader.clearRes
调用Laya.loader.load
依然是以前那张照片
 
 
是这个意思

joye1230

赞同来自:

Laya.loader.clearRes("http://10.144.1.20:8081/files/images/profile/by_dsfdsfsd.jpg",true);
强制清理后,还是只能获取到以前那张资源图片
 var test: Texture = Laya.loader.getRes("http://10.144.1.20:8081/files/ ... 6quot;);

joye1230

赞同来自:

........后面想到了一个很中二的办法解决了
比如请求地址 http://10.144.1.20:8081/files/images/profile/by_dsfdsfsd.jpg
就在后面加一个随机字符.......然后就可以刷新了
http://10.144.1.20:8081/files/ ... 23333

要回复问题请先

商务合作
商务合作