-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: improve docs on caching #886
base: main
Are you sure you want to change the base?
Changes from 4 commits
63e50e5
e2b8b2f
70682be
cd2d049
6d18518
98bc858
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,8 @@ import { | |
The following list outlines some guidelines and best practices for using <ProductName format={ProductNameFormat.ShortForm}/>: | ||
|
||
- Do not store Personal Identifiable Information in tuples | ||
- Always specify authorization model ID whenever possible | ||
- Always specify authorization model ID in requests | ||
- Specify the desired consistency in requests | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we link "consistency" to the relevant part in the doc? I would imagine people might not know what that is. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This bullet list is the titles of the sections below. I added the link to what consistency is down below 👍 |
||
|
||
## Do Not Store Personal Identifiable Information in Tuples | ||
|
||
|
@@ -29,14 +30,20 @@ You can use any string for user and object identifiers, however you should not i | |
The documentation and samples uses first names and simple ids to illustrate easy-to-follow examples. | ||
::: | ||
|
||
## Always specify authorization model ID whenever possible | ||
## Always specify authorization model ID in requests | ||
|
||
It is strongly recommended that authorization model ID be specified in your Relationship Queries (such as [Check](./perform-check.mdx) and [ListObjects](../interacting/relationship-queries.mdx#listobjects)) and Relationship Commands (such as [Write](./update-tuples.mdx)). | ||
|
||
Specifying authorization model ID in API calls have the following advantages: | ||
1. Better performance as <ProductName format={ProductNameFormat.ShortForm}/> will not need to perform a database query to get the latest authorization model ID. | ||
2. Allows consistent behavior in your production system until you are ready to switch to the new model. | ||
|
||
## Specify the desired consistency in requests | ||
|
||
It is strongly recommended that you specify the `Consistency` value in each individual request, depending on whether you prefer speed (MINIMIZE_LATENCY) or correctness (MAXIMIZE_CONSISTENCY). The default is MINIMIZE_LATENCY. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a good summary but again, is there a consistency section we can link to? |
||
|
||
In addition, if speed matters to you, we recommend that you follow [Production Best Practices](./production-best-practices.mdx). | ||
|
||
## Related Sections | ||
|
||
<RelatedSection | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which flags? That should be mentioned here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I mention the link where the flags are explained 🤔