补充文件缓存预加载接口preLoadCache、getCacheImage,请求头,以及ImageKnifeOption属性isCacheable、onlyRetrieveFromCache,请求头

Signed-off-by: zgf <zenggaofeng2@h-partners.com>
This commit is contained in:
zgf 2024-04-30 17:31:46 +08:00
parent 915c9275b3
commit e8f081523b
1 changed files with 2 additions and 2 deletions

View File

@ -50,14 +50,14 @@ struct TestIsUrlExist {
})
Button("内存缓存获取").onClick(()=>{
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)=>{
this.source = data!.source
})
})
Button("文件缓存获取").onClick(()=>{
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)=>{
this.source1 = data!.source
})