Sign In Register

How can we help you today?

Start a new topic
Answered

privateData size limit

Dear GameSparks Tech Team/Forum Users,

Is there any size limit on the "privateData" document on system player collection? This is a super useful feature to read and access player data on cloud code. Are there any observed size limits which might start slowing the processing of this document? Can we have a 10KB privateData document or having 100KB slows the processing down?


Also is there no way to partially update privateData values through querying? Does persisting privateData updates the entire document?


Thank you


Navin


Best Answer

Hi Navin,


There is no set limit on privateData as such but if you are planning on storing a large amount of data a runtime collection would be your best bet. You'll then be able to update any value on this collection with mongo update queries. An example of privateData use would be to store an email address. PrivateData would be used here because it is never exposed publicly, it has to be explicitly called to be returned. So for sensitive data it is perfect. Also to update specific objects in privatedata you would first need to get that piece of privatedata, make your changes to it and then set it again. You can't update individual fields within an object. I hope that clears that up for you.


Thanks,

Liam

1 Comment

Answer

Hi Navin,


There is no set limit on privateData as such but if you are planning on storing a large amount of data a runtime collection would be your best bet. You'll then be able to update any value on this collection with mongo update queries. An example of privateData use would be to store an email address. PrivateData would be used here because it is never exposed publicly, it has to be explicitly called to be returned. So for sensitive data it is perfect. Also to update specific objects in privatedata you would first need to get that piece of privatedata, make your changes to it and then set it again. You can't update individual fields within an object. I hope that clears that up for you.


Thanks,

Liam

Login to post a comment