is updateAsync good for autosaving and/ or for preventing glitches?
SetAsync
is generally prefered if the previously saved value is not important e.g. you're saving the player's position in a world.
UpdateAsync
is prefered when the previous value is important e.g. you're adding 10 coins onto the player's Coins stat.
The reason is that UpdateAsync
will make sure that the previous value is correct, while GetAsync
may return a cached value, meaning that SetAsync
would set it based on that cached value rather than the actual value.