Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: correct cachekey in files #3257

Merged
merged 2 commits into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
2 changes: 1 addition & 1 deletion packages/mgt-element/src/utils/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Loading