SharedPreference provides two ways to write changes i.e., commit() and apply(). Where commit() is a synchronous call and can block Mainthread. Whereas apply() write in-memory first followed by asynchronously to the disk.
More details on apply() can be found here.
Can we add option to use apply() by introducing a new API KVault.setAsync(... , ...)?
SharedPreference provides two ways to write changes i.e.,
commit()andapply(). Wherecommit()is a synchronous call and can block Mainthread. Whereasapply()write in-memory first followed by asynchronously to the disk.More details on apply() can be found here.
Can we add option to use apply() by introducing a new API
KVault.setAsync(... , ...)?