Skip to content

Commit

Permalink
fix cachekey in files
Browse files Browse the repository at this point in the history
  • Loading branch information
russgove committed Jul 16, 2024
1 parent fe6a38e commit cd458b0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/mgt-components/src/graph/graph.files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,8 @@ const getIterator = async (

// get iterator from cached values
const cache: CacheStore<CacheFileList> = CacheService.getCache<CacheFileList>(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);

Expand All @@ -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
});
Expand Down

0 comments on commit cd458b0

Please sign in to comment.