Currently when a script calls DataStore:GetAsync(), the result is cached for five seconds. This means that retrieving the same key within the next five seconds can return a stale result. We’ve identified this as unexpected behavior and are going to gradually reduce the local cache duration until is at zero seconds. As we incrementally lower the duration that keys are cached, we will monitor how it affects our backend.
What this means for you:
If a script in your game calls DataStore::GetAsync() more frequently than the current cache time of 5 seconds, you should expect your game to send more and more of your requests to the web to fetch the latest value of they key as we lower the cache duration. This will consume more of your allocated budget for Data Store Gets and if done too often, your game may be subject to increased throttling. Please rewrite your scripts to ensure that they do not perform too many Data Store Gets in a short amount of time. If you are following our guidelines then your game will not be negatively affected.
Expect the cache duration reduction to begin on August 17th.
I took me 2 weeks to figure out this myself back in 2015 (it wasn’t documented) and made me scrap what I was working on for over 3 weeks. I’m so happy this is being changed!
Last time that I checked :OnUpdate( ) had a “long” delay (30-60 seconds?) in receiving an event/update cross server, is this being addressed as well with the caching? Or is this solely caching on :GetAsync( )?
It is a method that can be really benificial for cross server communication or eg trading or matchmaking. But nevertheless, great update!
I know that’s the date in the OP, but sometimes these sorts of changes get delayed without notice. Plus the wiki still uses out of date information (it says the cache lasts for 10 seconds), so it’s hard to know what the actual limitations are set to right now.