文件缓存设置最大缓存数量改为无上限
Signed-off-by: zgf <zenggaofeng2@h-partners.com>
This commit is contained in:
parent
a1f80ce93f
commit
7930c50f11
|
@ -1,3 +1,6 @@
|
||||||
|
## 3.0.1-rc.0
|
||||||
|
- 文件缓存设置最大缓存数量改为无上限
|
||||||
|
|
||||||
## 3.0.0
|
## 3.0.0
|
||||||
- 修复图形变换的闪退问题
|
- 修复图形变换的闪退问题
|
||||||
- 自定义下载customGetImage改为仅主图支持
|
- 自定义下载customGetImage改为仅主图支持
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
"main": "index.ets",
|
"main": "index.ets",
|
||||||
"repository": "https://gitee.com/openharmony-tpc/ImageKnife",
|
"repository": "https://gitee.com/openharmony-tpc/ImageKnife",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "3.0.0",
|
"version": "3.0.1-rc.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ohos/gpu_transform": "^1.0.2"
|
"@ohos/gpu_transform": "^1.0.2"
|
||||||
},
|
},
|
||||||
|
|
|
@ -39,7 +39,7 @@ export class FileCache {
|
||||||
readonly defaultMemorySize: number = 128 * 1024 * 1024;
|
readonly defaultMemorySize: number = 128 * 1024 * 1024;
|
||||||
|
|
||||||
constructor(context: Context, size: number, memory: number) {
|
constructor(context: Context, size: number, memory: number) {
|
||||||
if (size <= 0 || size > this.defaultMaxSize) {
|
if (size <= 0) {
|
||||||
size = this.defaultSize
|
size = this.defaultSize
|
||||||
}
|
}
|
||||||
if (memory <= 0 || memory > this.defaultMaxMemorySize) {
|
if (memory <= 0 || memory > this.defaultMaxMemorySize) {
|
||||||
|
|
Loading…
Reference in New Issue