question

dryginstudios avatar image
dryginstudios asked

TitleData cache/consistency

Hello,

I understand that Title Data is cached and that we must not use frequently. We use use to store various "global" variable that doesn't change often. Maybe a few edits (1-2) per day.

I am OK with it being cached the problem is about consistency. 2 back to back requests from the SAME user may return 2 different results... Not convenient for time based events or a "kill" switch where sometimes it will return true, then false... then true...

If TitleData is NOT the place for this kind of usage, what is? Is there a way to trigger a refresh on the nodes (sending multiple read requests maybe?)

Thanks!!

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Seth Du avatar image
Seth Du answered

The behavior is due to Title Data’s sharded and cached nature, however the inconsistency only occurs shortly after you update the data. Few seconds or few minutes after data is updated, you should only get the latest version of the data. Title data is not designed for frequents change not only because it always takes time to get all shards up-to-date but also because you will get different value from different shards(sync process of each shards is different).

A good solution is keep a version value inside your title data so that the old version will be discard. Please refer to Brendan’s reply in this thread: https://community.playfab.com/questions/11162/updating-title-data.html

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.