I noticed this during my testing, if i add or remove values and kill the app asap, on my next session my addition or removal didn't get saved to disk. I think this has to do with the synchronisation call that needs to be made to persist changes to disk.
Am i doing something wrong, or is it indeed the case? and if so, can we maybe add an optional method that immediately flushes changes to disk?
The method already exists, and it's Defaults.synchronize(). Note that it's not recommended to use it in normal circumstances. But if you need to ensure synchronization for testing reasons, there you go
I noticed this during my testing, if i add or remove values and kill the app asap, on my next session my addition or removal didn't get saved to disk. I think this has to do with the synchronisation call that needs to be made to persist changes to disk.
Am i doing something wrong, or is it indeed the case? and if so, can we maybe add an optional method that immediately flushes changes to disk?