getPreferenceItemProperty and setPreferenceItemProperty

Hi,

I am implementing a Generic action form UI to let user pick his default group among multiple groups he belongs to. 

I could achieve it with adding a property to Core_GlobalLayout and write getter and setter for this with sql, but when I use  API setPreferenceItemProperty / getPreferenceItemProperty, the value does not get saved or retried.

Also, I could not find in documentation if these APIs store and retrieve from client cache(in case database transaction happens only during logout) or from database. In my case, if any CAD connector or external system needs access to this property, I want to make sure I know when it goes to database.

Anyone has any previous experience with these APIs?