From 1e4b42d12978f30ff44ebd61b51af95a5c20e609 Mon Sep 17 00:00:00 2001 From: Jack Martin Date: Sat, 16 Oct 2021 18:28:34 +0100 Subject: [PATCH] :bug: set cache after insert --- src/modules/persistence/fs/fs-persistence.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/modules/persistence/fs/fs-persistence.ts b/src/modules/persistence/fs/fs-persistence.ts index 2eb86ae..45c5872 100644 --- a/src/modules/persistence/fs/fs-persistence.ts +++ b/src/modules/persistence/fs/fs-persistence.ts @@ -7,7 +7,6 @@ import PQueue from 'p-queue'; import { IFS } from '../../../interfaces/fs.interface'; import { ICamaConfig } from '../../../interfaces/cama-config.interface'; import * as path from 'path'; -import sift from 'sift'; import { ILogger } from '../../../interfaces/logger.interface'; import { LogLevel } from '../../../interfaces/logger-level.enum'; @@ -51,7 +50,7 @@ export default class FSPersistence implements IPersistenceAdapter { const data = [...(await this.getData()), ...rows]; await this.fs.writeData(outputPath, this.collectionName, data); await this.fs.commit(outputPath, this.collectionName); - this.cache = null; + this.cache = data; }); }