How to load cache items from the persistent storage:
'onInit' - the whole stored data will be loaded during the cache initialization;
'onDemand' - each stored item will be loaded from the cache only on the first touch, i.e. on-demand or lazily;
'onOfflineDemand' - each stored item will be loaded from the cache only on the first touch and only if
there is no internet connection (the strategy is useful to create net-first offline storages)
default
'onDemand'
Optional persistentTTL
persistentTTL?:number
Default time to expire a cache item in the persistent storage
How to load cache items from the persistent storage:
'onInit'
- the whole stored data will be loaded during the cache initialization;'onDemand'
- each stored item will be loaded from the cache only on the first touch, i.e. on-demand or lazily;'onOfflineDemand'
- each stored item will be loaded from the cache only on the first touch and only if there is no internet connection (the strategy is useful to create net-first offline storages)'onDemand'