forked from floraachy/ImageKnife
补充文件缓存预加载接口preLoadCache、getCacheImage,请求头,以及ImageKnifeOption属性isCacheable、onlyRetrieveFromCache,请求头
Signed-off-by: zgf <zenggaofeng2@h-partners.com>
This commit is contained in:
parent
915c9275b3
commit
e8f081523b
|
@ -50,14 +50,14 @@ struct TestIsUrlExist {
|
||||||
})
|
})
|
||||||
Button("内存缓存获取").onClick(()=>{
|
Button("内存缓存获取").onClick(()=>{
|
||||||
ImageKnife.getInstance()
|
ImageKnife.getInstance()
|
||||||
.getCacheImage('https://hbimg.huabanimg.com/95a6d37a39aa0b70d48fa18dc7df8309e2e0e8e85571e-x4hhks_fw658/format/webp',Cache_Type.Memory)
|
.getCacheImage('https://hbimg.huabanimg.com/95a6d37a39aa0b70d48fa18dc7df8309e2e0e8e85571e-x4hhks_fw658/format/webp',ReadCacheStrategyType.Memory)
|
||||||
.then((data)=>{
|
.then((data)=>{
|
||||||
this.source = data!.source
|
this.source = data!.source
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
Button("文件缓存获取").onClick(()=>{
|
Button("文件缓存获取").onClick(()=>{
|
||||||
ImageKnife.getInstance()
|
ImageKnife.getInstance()
|
||||||
.getCacheImage('https://hbimg.huabanimg.com/95a6d37a39aa0b70d48fa18dc7df8309e2e0e8e85571e-x4hhks_fw658/format/webp',Cache_Type.File)
|
.getCacheImage('https://hbimg.huabanimg.com/95a6d37a39aa0b70d48fa18dc7df8309e2e0e8e85571e-x4hhks_fw658/format/webp',ReadCacheStrategyType.File)
|
||||||
.then((data)=>{
|
.then((data)=>{
|
||||||
this.source1 = data!.source
|
this.source1 = data!.source
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue