The data goes first to memory store (And being changed in it), then backups time by time into a datastore, and if there’s no current data in memory store, take it from datastore and put in memory store, repeat?
Yes, that’s the idea.
The MemoryStore is for your game purposes - the DataStore is there as your backup.
If your game is big enough though, a data expiry will probably never happen, but it’s just a contingency.
Data in MemoryStore will expire only if it haven’t been changed for the time you put in?
I asked it because of this
If your game is big enough though, a data expiry will probably never happen
I mentioned this in another reply:
Also, MemoryStore data refreshes when it is overwritten…
Please read the tutorial if you still have questions.
ok so if I overwrite data (basically update it?), then the expiration time will update to X
If expiration date is idk 10 minutes
and I save backup every 1 minute, is it good or bad (will it lag or something)?
No, as long as you delegate the job of saving the data into a datastore to just a single server.
Also, there’s no need to set the expiry time that short, especially if you don’t have a lot of data to handle.
if I have 10 items (example) in a game
and every time player gets one I add existing amount +1 to a memory store with expiration date 30 days
and save backup probably every hour (And there like idk 5-10 servers)
Will it be bad?
No.
As I’ve said, please read the tutorial if you need the specifics for what you just asked.
I am reading through tutorial and almost ended reading it, then I will read documentation
“No” means it will not be bad?
I am reading through tutorial and almost ended reading it, then I will read documentation
Give this a read, and you’ll understand that it’s totally fine to do what you’re suggesting.
I don’t think I can provide anymore input to your problem that hasn’t already been elaborated in that page.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.