generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: GetAsync vs. UpdateAsync for reading Data Stores

Previous Thread :: Next Thread 
MM233 is not online. 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 is not online. 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 is not online. 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
nQqzRYVpIKA5jLP is not online. nQqzRYVpIKA5jLP
Joined: 05 Mar 2015
Total Posts: 4135
22 Mar 2015 10:51 PM
If you returned nil, it would update the value to nil.
Report Abuse
MM233 is not online. 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 is not online. micke3212
Joined: 24 Nov 2009
Total Posts: 3000
22 Mar 2015 10:52 PM
That's why I said use break.
Report Abuse
MM233 is not online. 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
nQqzRYVpIKA5jLP is not online. nQqzRYVpIKA5jLP
Joined: 05 Mar 2015
Total Posts: 4135
22 Mar 2015 10:59 PM
So, why do you need to get a value more than once every 10 seconds?
Report Abuse
MM233 is not online. 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 is not online. 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 is not online. 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
blooo127127 is not online. blooo127127
Joined: 22 Jul 2010
Total Posts: 403
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
blooo127127 is not online. blooo127127
Joined: 22 Jul 2010
Total Posts: 403
23 Mar 2015 08:05 AM
Toaster = GetAsync

Oven = UpdateAsync
Report Abuse
MM233 is not online. 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
blooo127127 is not online. blooo127127
Joined: 22 Jul 2010
Total Posts: 403
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image