我正在尝试使用@pnp-Storage为 SPFX WebPart 实现缓存。缓存在 Temas 浏览器中工作正常,但在 Teams 客户端中,它不起作用。它非常慢,因为我必须进行多个天蓝色函数调用。有人可以帮我在团队的应用程序中缓存吗?请参考下面的代码。
// Getting data from session variable
This.isListsExists = this.storage.session.get(isListsExists);
// If it exists in the session variable then don't make the HTTP call. Otherwise, make the
// call and save it in the session variable.
if (!this.isListsExists) {
this.isListsExists = await this.mapDataProvider.checkIfAllListsExist(); //cache
// Setting Session variable.
this.storage.session.put(isListsExists, this.isListsExists, end);
}