Naïve global.set question

I was wondering how to use global.set properly. It seems like changing the properties of an object brought in by global.get immediately propagates to the global object, without needing to global.set, because global.get passes by reference. Is global.set necessary?

By default, context is stored in memory and yes, get returns the object without cloning it, so any modifications will be applied to the object still in the context store.

However, if you enable a persistent context store, so the contents are saved in files, you need to use global.set in order to tell the store the value has changed and needs saving.

2 Likes

Knolleary, thank you.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.