They can share preferences by specifying the name of a Preferences instance. Note that after an application calls the getPreferences API for the first time, the Preferences instance obtained is cached. When the application calls the getPreferences API again, the cached instance is returned. Therefore, when multiple processes hold the same preferences file, you must subscribe to the inter-process data change event through the on('multiProcessChange') callback, call removePreferencesFromCache in the callback to remove the cached Preferences instance, and then obtain a new Preferences instance.
Reference