SAP Spartacus的持久化存储学习笔记
https://sap.github.io/spartacus-docs/configurable-state-persistence-and-rehydration/
Spartacus offers a mechanism to sync NGRX’s store slices to the specified browser’s storage - localStorage or sessionStorage.
ngrx的存儲(chǔ)slice暫時(shí)同步到瀏覽器的storage里去:localStorage或者SessionStorage.
例子:購(gòu)物車(chē)id:
access token也存儲(chǔ)在內(nèi):
access_token_stored_at
In case there is a need to sync multiple slices of the state, just specify the required properties in storageSync’s keys config and specify the storage type.
需要同步多個(gè)state slice的情況如何做?
default-state-config.ts里定義的spartcacus-local-data, 也就是Chrome開(kāi)發(fā)者工具里觀察到的數(shù)據(jù):
更多Jerry的原創(chuàng)文章,盡在:“汪子熙”:
總結(jié)
以上是生活随笔為你收集整理的SAP Spartacus的持久化存储学习笔记的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 森林通关剧情图文流程 森林通关攻略 森林
- 下一篇: 财政性资金是指