diff --git a/imageknife/src/main/ets/components/cache/DiskLruCache.ets b/imageknife/src/main/ets/components/cache/DiskLruCache.ets index f1e3a6c..35594a4 100644 --- a/imageknife/src/main/ets/components/cache/DiskLruCache.ets +++ b/imageknife/src/main/ets/components/cache/DiskLruCache.ets @@ -162,6 +162,7 @@ export class DiskLruCache { */ setMaxSize(max: number) { this.maxSize = max + this.trimToSize() } /** @@ -238,7 +239,7 @@ export class DiskLruCache { if (this.fileUtils.exist(path)) { var ab: ArrayBuffer = this.fileUtils.readFilePic(path) this.putCacheMap(key, ab.byteLength) - this.fileUtils.writeData(path, 'read ' + key + '\n') + this.fileUtils.writeData(this.journalPath, 'read ' + key + '\n') return ab } else { return null; @@ -260,7 +261,7 @@ export class DiskLruCache { } var path = this.dirPath + key; if (this.fileUtils.exist(path)) { - this.fileUtils.writeData(path, 'read ' + key + '\n') + this.fileUtils.writeData(this.journalPath, 'read ' + key + '\n') return path } else { return null