From cd458b04329e03af292b44e755db8086dd7540bc Mon Sep 17 00:00:00 2001 From: Russell Gove Date: Tue, 16 Jul 2024 13:19:36 +0000 Subject: [PATCH 1/2] fix cachekey in files --- packages/mgt-components/src/graph/graph.files.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/mgt-components/src/graph/graph.files.ts b/packages/mgt-components/src/graph/graph.files.ts index 2a64d84154..7ce3adc6da 100644 --- a/packages/mgt-components/src/graph/graph.files.ts +++ b/packages/mgt-components/src/graph/graph.files.ts @@ -254,7 +254,8 @@ const getIterator = async ( // get iterator from cached values const cache: CacheStore = CacheService.getCache(schemas.fileLists, storeName); - const fileList = await getFileListFromCache(cache, storeName, `${endpoint}:${top}`); + const cacheKey=`${endpoint}:${top}`; + const fileList = await getFileListFromCache(cache, storeName, cacheKey); if (fileList) { filesPageIterator = getFilesPageIteratorFromCache(graph, fileList.files, fileList.nextLink); @@ -272,7 +273,7 @@ const getIterator = async ( if (getIsFileListsCacheEnabled()) { const nextLink = filesPageIterator.nextLink; - await cache.putValue(endpoint, { + await cache.putValue(cacheKey, { files: filesPageIterator.value.map(v => JSON.stringify(v)), nextLink }); From 09ebc2f045b6cea39dd7174b255d847afe402bda Mon Sep 17 00:00:00 2001 From: Russell Gove Date: Wed, 17 Jul 2024 12:54:58 +0000 Subject: [PATCH 2/2] ran prettier --- packages/mgt-components/src/graph/graph.files.ts | 2 +- packages/mgt-element/src/utils/version.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/mgt-components/src/graph/graph.files.ts b/packages/mgt-components/src/graph/graph.files.ts index 7ce3adc6da..b19fc7cd7f 100644 --- a/packages/mgt-components/src/graph/graph.files.ts +++ b/packages/mgt-components/src/graph/graph.files.ts @@ -254,7 +254,7 @@ const getIterator = async ( // get iterator from cached values const cache: CacheStore = CacheService.getCache(schemas.fileLists, storeName); - const cacheKey=`${endpoint}:${top}`; + const cacheKey = `${endpoint}:${top}`; const fileList = await getFileListFromCache(cache, storeName, cacheKey); if (fileList) { filesPageIterator = getFilesPageIteratorFromCache(graph, fileList.files, fileList.nextLink); diff --git a/packages/mgt-element/src/utils/version.ts b/packages/mgt-element/src/utils/version.ts index 4720e596a2..e2c9e61aac 100644 --- a/packages/mgt-element/src/utils/version.ts +++ b/packages/mgt-element/src/utils/version.ts @@ -8,4 +8,4 @@ // THIS FILE IS AUTO GENERATED // ANY CHANGES WILL BE LOST DURING BUILD -export const PACKAGE_VERSION = '4.1.0'; +export const PACKAGE_VERSION = '4.2.3';