From b64661b9f98b90f6852cedcc6051ac686461bcb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=A2=E6=9D=A1=E4=BE=A0?= Date: Mon, 8 Apr 2024 02:57:50 +0000 Subject: [PATCH] update README.md. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 面条侠 --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 327873a..79a0940 100644 --- a/README.md +++ b/README.md @@ -333,6 +333,7 @@ request.skipMemoryCache(true) | preload(request: RequestOption) | request: RequestOption | 根据用户配置参数具体执行预加载流程 | | pauseRequests() | | 全局暂停请求 | | resumeRequests() | | 全局恢复暂停 | +| isUrlExist(url, cacheType, size)| url, CacheType, Size | 判断图片是否在 缓存和磁盘中存在,如果入参是缓存,需要传入值图片大小,参数 CacheType, Size(可选)| ### 缓存策略相关 @@ -352,6 +353,14 @@ request.skipMemoryCache(true) | AntiAliasing.FIT_MEDIUM | String | 图像抗锯齿设置为中画质 | | AntiAliasing.FIT_LOW | String | 图像抗锯齿设置为低画质 | +### CacheType类型展示效果 + +| 使用方法 | 类型 | 策略描述 | +|-------------------------|-----|-----------------------------------| +| CacheType.Default| int | 默认值,先从内存获取,无值则从磁盘获取 | +| CacheType.Cache| int | 缓存 | +| CacheType.Disk | int | 磁盘 | + ### ScaleType类型展示效果 | 使用方法 | 类型 | 策略描述 | @@ -520,6 +529,7 @@ HSP场景适配: - OptionTestPage.ets # 图片缓存测试 - testManyGifLoadWithPage # 测试gif加载页面 + - testImageKnifeCache # 测试图片是否在缓存或者磁盘中 -workers - upngWorkerTestCase.ets # png子线程解析 - upngWorkerDepend.ts # png子线程解析具体执行