What does caching mean?

I have seen several people talk about caching, I don’t know what it is

1 Like

Caching is the storing of data from executions so that in the case they need to be executed again it can be done faster than it would if the execution was not cached. Find a more in-depth explination on Wikipedia.


Adding on to what @xthlla said, I believe that this concept mostly relates to the use of player data in relation to DataStores and whatnot (that’s the only instance where I’ve heard the term being used). Due to DataStore limits, as well as the instability of Roblox’s servers sometimes, I believe some systems store player data locally, and modify that instead of directly reading/writing from Datastores. The only time where Datastores are written to and from is when the player enters/leaves or the server shuts down.

Another use for a cache would be for loading modules.

Yes, Roblox’s limitations of the amount of requests that can be sent to a particular DataStore are sometimes not enough for games that write data every second or so. This could be ‘cached’ using an array that creates a string variable with the purpose of holding the data whilst the DataStore request queue empties, then saving those to the DataStore. In the case that the same data needs to be written again, the script can call back to this variable.