Skip to content

Commit 5551351

Browse files
authored
fix: use a consistent cachekey in file list cache (#3257)
* fix cachekey in files * ran prettier
1 parent fe6a38e commit 5551351

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

packages/mgt-components/src/graph/graph.files.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,8 @@ const getIterator = async (
254254

255255
// get iterator from cached values
256256
const cache: CacheStore<CacheFileList> = CacheService.getCache<CacheFileList>(schemas.fileLists, storeName);
257-
const fileList = await getFileListFromCache(cache, storeName, `${endpoint}:${top}`);
257+
const cacheKey = `${endpoint}:${top}`;
258+
const fileList = await getFileListFromCache(cache, storeName, cacheKey);
258259
if (fileList) {
259260
filesPageIterator = getFilesPageIteratorFromCache(graph, fileList.files, fileList.nextLink);
260261

@@ -272,7 +273,7 @@ const getIterator = async (
272273

273274
if (getIsFileListsCacheEnabled()) {
274275
const nextLink = filesPageIterator.nextLink;
275-
await cache.putValue(endpoint, {
276+
await cache.putValue(cacheKey, {
276277
files: filesPageIterator.value.map(v => JSON.stringify(v)),
277278
nextLink
278279
});

packages/mgt-element/src/utils/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
// THIS FILE IS AUTO GENERATED
99
// ANY CHANGES WILL BE LOST DURING BUILD
1010

11-
export const PACKAGE_VERSION = '4.1.0';
11+
export const PACKAGE_VERSION = '4.2.3';

0 commit comments

Comments
 (0)