From 205af02fb870f7c9e36a36acaa4d5d01274bf665 Mon Sep 17 00:00:00 2001 From: guerler Date: Mon, 7 Feb 2022 19:24:08 -0500 Subject: [PATCH] Remove rxjs based caching modules for now --- .../DatasetCollection/DatasetCollection.vue | 12 +- .../DatasetCollectionUIWrapper.vue | 33 +- .../GenericContentItem/DatasetUIWrapper.vue | 7 +- .../History/ContentItem/Subdataset.vue | 12 +- .../components/History/ContentOperations.vue | 7 - .../providers/History/caching/CacheApi.js | 29 -- .../History/caching/__mocks__/index.js | 10 - .../providers/History/caching/asObservable.js | 48 --- .../History/caching/db/cacheIndices.js | 28 -- .../providers/History/caching/db/changes.js | 45 -- .../History/caching/db/changes.test.js | 172 -------- .../providers/History/caching/db/db.test.js | 251 ----------- .../providers/History/caching/db/find.js | 42 -- .../providers/History/caching/db/find.test.js | 368 ---------------- .../providers/History/caching/db/index.js | 16 - .../History/caching/db/monitorQuery.js | 56 --- .../History/caching/db/monitorQuery.test.js | 398 ------------------ .../History/caching/db/observables.js | 181 -------- .../providers/History/caching/db/pouch.js | 233 ---------- .../providers/History/caching/db/promises.js | 47 --- .../History/caching/db/wipeDatabase.js | 10 - .../providers/History/caching/enums.js | 9 - .../providers/History/caching/index.js | 18 - .../History/caching/loadDscContent.js | 50 --- .../History/caching/loadHistoryContents.js | 141 ------- .../History/caching/monitorHistoryContent.js | 190 --------- .../caching/monitorHistoryContent.test.js | 122 ------ .../History/caching/operators/hydrate.js | 16 - .../caching/operators/lastCachedDate.js | 36 -- .../History/caching/operators/needs.js | 12 - .../operators/requestWithUpdateTime.js | 71 ---- .../caching/operators/throttleDistinct.js | 32 -- 32 files changed, 10 insertions(+), 2692 deletions(-) delete mode 100644 client/src/components/providers/History/caching/CacheApi.js delete mode 100644 client/src/components/providers/History/caching/__mocks__/index.js delete mode 100644 client/src/components/providers/History/caching/asObservable.js delete mode 100644 client/src/components/providers/History/caching/db/cacheIndices.js delete mode 100644 client/src/components/providers/History/caching/db/changes.js delete mode 100644 client/src/components/providers/History/caching/db/changes.test.js delete mode 100644 client/src/components/providers/History/caching/db/db.test.js delete mode 100644 client/src/components/providers/History/caching/db/find.js delete mode 100644 client/src/components/providers/History/caching/db/find.test.js delete mode 100644 client/src/components/providers/History/caching/db/index.js delete mode 100644 client/src/components/providers/History/caching/db/monitorQuery.js delete mode 100644 client/src/components/providers/History/caching/db/monitorQuery.test.js delete mode 100644 client/src/components/providers/History/caching/db/observables.js delete mode 100644 client/src/components/providers/History/caching/db/pouch.js delete mode 100644 client/src/components/providers/History/caching/db/promises.js delete mode 100644 client/src/components/providers/History/caching/db/wipeDatabase.js delete mode 100644 client/src/components/providers/History/caching/enums.js delete mode 100644 client/src/components/providers/History/caching/index.js delete mode 100644 client/src/components/providers/History/caching/loadDscContent.js delete mode 100644 client/src/components/providers/History/caching/loadHistoryContents.js delete mode 100644 client/src/components/providers/History/caching/monitorHistoryContent.js delete mode 100644 client/src/components/providers/History/caching/monitorHistoryContent.test.js delete mode 100644 client/src/components/providers/History/caching/operators/hydrate.js delete mode 100644 client/src/components/providers/History/caching/operators/lastCachedDate.js delete mode 100644 client/src/components/providers/History/caching/operators/needs.js delete mode 100644 client/src/components/providers/History/caching/operators/requestWithUpdateTime.js delete mode 100644 client/src/components/providers/History/caching/operators/throttleDistinct.js diff --git a/client/src/components/History/ContentItem/DatasetCollection/DatasetCollection.vue b/client/src/components/History/ContentItem/DatasetCollection/DatasetCollection.vue index 14e7e38b900..6340d02ace7 100644 --- a/client/src/components/History/ContentItem/DatasetCollection/DatasetCollection.vue +++ b/client/src/components/History/ContentItem/DatasetCollection/DatasetCollection.vue @@ -15,7 +15,6 @@ import DscUI from "./DscUI"; import { DatasetCollection } from "../../model"; import { deleteDatasetCollection, updateContentFields } from "../../model/queries"; -import { cacheContent } from "components/providers/History/caching"; export default { components: { @@ -33,13 +32,7 @@ export default { async onDelete(flags = {}) { const { recursive = false, purge = false } = flags; const collection = this.item; - const result = await deleteDatasetCollection(collection, recursive, purge); - if (result.deleted) { - const newFields = Object.assign(collection, { - isDeleted: result.deleted, - }); - await cacheContent(newFields); - } + await deleteDatasetCollection(collection, recursive, purge); }, async onUnhide() { await this.onUpdate({ visible: true }); @@ -48,8 +41,7 @@ export default { await this.onUpdate({ deleted: false }); }, async onUpdate(changes) { - const newContent = await updateContentFields(this.item, changes); - await cacheContent(newContent); + await updateContentFields(this.item, changes); }, }, }; diff --git a/client/src/components/History/ContentItem/GenericContentItem/DatasetCollectionUIWrapper.vue b/client/src/components/History/ContentItem/GenericContentItem/DatasetCollectionUIWrapper.vue index ebf8d890fd1..eb07c745373 100644 --- a/client/src/components/History/ContentItem/GenericContentItem/DatasetCollectionUIWrapper.vue +++ b/client/src/components/History/ContentItem/GenericContentItem/DatasetCollectionUIWrapper.vue @@ -19,7 +19,6 @@