MM233
|
  |
| Joined: 19 Jun 2008 |
| Total Posts: 925 |
|
|
| 22 Mar 2015 10:24 PM |
| According to the Wiki, GetAsync() catches for about 10 seconds, and thus may not return the actual value on the server. UpdateAsync() is not said to do this. Could UpdateAsync() then be used to read Data Stores more accurately than GetAsync() by returning nil to cancel the update, rather than completing the update? |
|
|
| Report Abuse |
|
|
micke3212
|
  |
| Joined: 24 Nov 2009 |
| Total Posts: 3000 |
|
|
| 22 Mar 2015 10:44 PM |
I don't think it caches for 10 seconds, that has been reduced I think. By the way, using UpdateAsync() would be nice, if you used a break and nil if it wasn't real.
Overall, it'd work depends on whether you wish to use Get or not. |
|
|
| Report Abuse |
|
|
MM233
|
  |
| Joined: 19 Jun 2008 |
| Total Posts: 925 |
|
|
| 22 Mar 2015 10:50 PM |
| Where would I get confirmation of that change? Also, it wouldn't be a break, but "return nil" inside the function. |
|
|
| Report Abuse |
|
|
|
| 22 Mar 2015 10:51 PM |
| If you returned nil, it would update the value to nil. |
|
|
| Report Abuse |
|
|
MM233
|
  |
| Joined: 19 Jun 2008 |
| Total Posts: 925 |
|
|
| 22 Mar 2015 10:52 PM |
On the contrary:
"If the function returns nil, the update is cancelled." http://wiki.roblox.com/index.php?title=Data_store |
|
|
| Report Abuse |
|
|
micke3212
|
  |
| Joined: 24 Nov 2009 |
| Total Posts: 3000 |
|
|
| 22 Mar 2015 10:52 PM |
| That's why I said use break. |
|
|
| Report Abuse |
|
|
MM233
|
  |
| Joined: 19 Jun 2008 |
| Total Posts: 925 |
|
|
| 22 Mar 2015 10:54 PM |
| Also, having no value returned by the function (using "break") is the same thing as returning nil. |
|
|
| Report Abuse |
|
|
|
| 22 Mar 2015 10:59 PM |
| So, why do you need to get a value more than once every 10 seconds? |
|
|
| Report Abuse |
|
|
MM233
|
  |
| Joined: 19 Jun 2008 |
| Total Posts: 925 |
|
|
| 22 Mar 2015 11:11 PM |
| I don't have a specific case, however I prefer to eliminate as much possibility for error as I can. |
|
|
| Report Abuse |
|
|
micke3212
|
  |
| Joined: 24 Nov 2009 |
| Total Posts: 3000 |
|
|
| 22 Mar 2015 11:15 PM |
| Well obviously if you knew the topic so well it shouldn't really matter. |
|
|
| Report Abuse |
|
|
MM233
|
  |
| Joined: 19 Jun 2008 |
| Total Posts: 925 |
|
|
| 23 Mar 2015 07:41 AM |
| Just a bump to see if anyone who was actually sleeping last night has anything to say on the subject. :D |
|
|
| Report Abuse |
|
|
|
| 23 Mar 2015 08:04 AM |
Just use UpdateAsync.
It's like
A toaster that can only toast once piece of bread
VS
An oven that can toast a lot of bread, and you can pull bread and put bread in any time you feel it.
I'm tired, that's my example, just roll with it. |
|
|
| Report Abuse |
|
|
|
| 23 Mar 2015 08:05 AM |
Toaster = GetAsync
Oven = UpdateAsync |
|
|
| Report Abuse |
|
|
MM233
|
  |
| Joined: 19 Jun 2008 |
| Total Posts: 925 |
|
|
| 23 Mar 2015 09:07 AM |
| Totally got the analogy from the first post. Now I'm wondering, to stick with the analogy, does UpdateAsync take more "power" the way an Oven takes more power than a Toaster? I would think so... amazing how well your analogy describes the situation. Lol. |
|
|
| Report Abuse |
|
|
|
| 23 Mar 2015 11:34 AM |
Uh... the toaster and the oven both use the same amount of power, as far as I know. http://wiki.roblox.com/index.php?title=Data_store
See that for more info, specifically the section about "Limitations". |
|
|
| Report Abuse |
|
|