Skip to content

Commit b907402

Browse files
Merge pull request SharePoint#8882 from juliemturner/patch-1
Update use-sp-pnp-js-with-spfx-web-parts.md
2 parents affdd49 + ac0ab54 commit b907402

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/spfx/web-parts/guidance/use-sp-pnp-js-with-spfx-web-parts.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Use @pnp/sp (PnPJS) library with SharePoint Framework web parts
33
description: This library provides a fluent API to make building your REST queries intuitive and supports batching and caching.
4-
ms.date: 07/22/2022
4+
ms.date: 04/12/2023
55
ms.localizationpriority: high
66
---
77

@@ -293,10 +293,10 @@ export default class PnPjsExample extends React.Component<IPnPjsExampleProps, II
293293
// - await resolves proimises making your code act syncronous, ergo Promise<IResponseItem[]> becomes IResponse[]
294294

295295
//Extending our sp object to include caching behavior, this modification will add caching to the sp object itself
296-
//this._sp.using(Caching("session"));
296+
//this._sp.using(Caching({store:"session"}));
297297

298298
//Creating a new sp object to include caching behavior. This way our original object is unchanged.
299-
const spCache = spfi(this._sp).using(Caching("session"));
299+
const spCache = spfi(this._sp).using(Caching({store:"session"}));
300300

301301
const response: IResponseItem[] = await spCache.web.lists
302302
.getByTitle(this.LIBRARY_NAME)

0 commit comments

Comments
 (0)