文件缓存设置最大缓存数量改为无上限

Signed-off-by: zgf <zenggaofeng2@h-partners.com>
This commit is contained in:
zgf 2024-07-18 10:59:03 +08:00
parent a1f80ce93f
commit 7930c50f11
3 changed files with 5 additions and 2 deletions

View File

@ -1,3 +1,6 @@
## 3.0.1-rc.0
- 文件缓存设置最大缓存数量改为无上限
## 3.0.0
- 修复图形变换的闪退问题
- 自定义下载customGetImage改为仅主图支持

View File

@ -14,7 +14,7 @@
"main": "index.ets",
"repository": "https://gitee.com/openharmony-tpc/ImageKnife",
"type": "module",
"version": "3.0.0",
"version": "3.0.1-rc.0",
"dependencies": {
"@ohos/gpu_transform": "^1.0.2"
},

View File

@ -39,7 +39,7 @@ export class FileCache {
readonly defaultMemorySize: number = 128 * 1024 * 1024;
constructor(context: Context, size: number, memory: number) {
if (size <= 0 || size > this.defaultMaxSize) {
if (size <= 0) {
size = this.defaultSize
}
if (memory <= 0 || memory > this.defaultMaxMemorySize) {