From 4cc6baa40ae1b2cde8d2d3486de55c6628a6d36d Mon Sep 17 00:00:00 2001 From: Jonathan Barrow Date: Thu, 7 Dec 2023 20:19:59 -0500 Subject: [PATCH] datastore: document period field --- docs/nex/protocols/datastore/index.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/docs/nex/protocols/datastore/index.md b/docs/nex/protocols/datastore/index.md index 5eabd69..87482af 100644 --- a/docs/nex/protocols/datastore/index.md +++ b/docs/nex/protocols/datastore/index.md @@ -743,7 +743,7 @@ In NEX version 3.5, one more field was added: | [DataStorePermission] | permission | | [DataStorePermission] | delPermission | | Uint32 | flag | -| Uint16 | period | +| Uint16 | [period](#period) | | Uint32 | referDataId | | [List]<[String]> | tags | | [List]<[DataStoreRatingInitParamWithSlot]> | ratingInitParams | @@ -759,7 +759,7 @@ In NEX version 3.5, one more field was added: | [DataStorePermission] | permission | | [DataStorePermission] | delPermission | | Uint32 | flag | -| Uint16 | period | +| Uint16 | [period](#period) | | Uint32 | referDataId | | [List]<[String]> | tags | | [List]<[DataStoreRatingInitParamWithSlot]> | ratingInitParams | @@ -821,7 +821,7 @@ In NEX version 3.5, one more field was added: | [String] | name | | [DataStorePermission] | permission | | [DataStorePermission] | delPermission | -| Uint16 | period | +| Uint16 | [period](#period) | | [qBuffer] | metaBinary | | [List]<[String]> | tags | | Uint64 | updatePassword | @@ -835,7 +835,7 @@ In NEX version 3.5, one more field was added: | [String] | name | | [DataStorePermission] | permission | | [DataStorePermission] | delPermission | -| Uint16 | period | +| Uint16 | [period](#period) | | [qBuffer] | metaBinary | | [List]<[String]> | tags | | Uint64 | updatePassword | @@ -888,7 +888,7 @@ Revision 1: | [DataStorePermission] | delPermission | | [DateTime] | createdTime | | [DateTime] | updatedTime | -| Uint16 | period | +| Uint16 | [period](#period) | | Uint8 | status | | Uint32 | referredCnt | | Uint32 | referDataId | @@ -1200,7 +1200,7 @@ Permission types: | [String] | name | | [DataStorePermission] | permission | | [DataStorePermission] | delPermission | -| Uint16 | period | +| Uint16 | [period](#period) | | [qBuffer] | metaBinary | | [List]<[String]> | tags | | Uint32 | referredCnt | @@ -1245,6 +1245,9 @@ In DataStore `modifiesFlag` is a set of flags which determine what data gets upd | `0x100` | Update objects `referredCnt` field. Set, not added | | `0x200` | Update objects `status` field. Anything besides `0` seems to result in `DataStore::NotFound` on future requests | +### Period +DataStore objects are really just S3 objects. The `period` field of an object is the number of *days* the object is valid for before it expires and is deleted from S3. Objects can be "refreshed" to update their expire time, which also updates the objects `updatedTime` field. Not all games respect this value, however, and will either set their own expire time or never expire objects even if a `period` is set for them + [Result]: /docs/nex/types#result [String]: /docs/nex/types#string [Buffer]: /docs/nex/types#buffer