Skip to content

LocalStorage.Reload

method · LocalStorage · cAlgo.API

DesktopCLICloud

Reloads all values from the disk. When calling this method, unsaved pending changes may be lost. To avoid losing information, call the Flush() method first.

Environment behaviour

Cloud — not supported. Does nothing and reports no error; in-memory values are kept unchanged.

Definition

void Reload(LocalStorageScope localStorageScope)
api.LocalStorage.Reload(localStorageScope: LocalStorageScope) -> None

Parameters

Name C# type Python type Description
localStorageScope LocalStorageScope LocalStorageScope The storage scope to reload

Examples

LocalStorage.Reload(LocalStorageScope.Device);
Print("Value saved by another instance: {0}", LocalStorage.GetString("Last Signal", LocalStorageScope.Device));
api.LocalStorage.Reload(LocalStorageScope.Device)
api.Print(f"Value saved by another instance: {api.LocalStorage.GetString('Last Signal', LocalStorageScope.Device)}")