diff --git a/src/utils/sharepoint.rest/web.ts b/src/utils/sharepoint.rest/web.ts index 853ef72..e37b7aa 100644 --- a/src/utils/sharepoint.rest/web.ts +++ b/src/utils/sharepoint.rest/web.ts @@ -293,6 +293,7 @@ export function GetContentTypesSync(siteUrl: string, options: IGetContentTypesOp interface IGetListsOptions { includeRootFolders?: boolean; includeViews?: boolean; + allowCache?: boolean; } function _getListsRequestUrl(siteUrl: string, options: IGetListsOptions) { @@ -335,8 +336,8 @@ function _postProcessGetLists(lists: iList[], options: Omit { let url = _getListsRequestUrl(siteUrl, options); - - return GetJson<{ value: iList[]; }>(url, null, { allowCache: true, jsonMetadata: jsonTypes.nometadata }) + const allowCache = options.allowCache === undefined ? true : options.allowCache; + return GetJson<{ value: iList[]; }>(url, null, { allowCache, jsonMetadata: jsonTypes.nometadata }) .then(result => { return _postProcessGetLists(result.value, options); })