-
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?
Conversation
|
@@ -29,7 +29,7 @@ The following list outlines best practices for running OpenFGA in a production e | |||
|
|||
We recommend: | |||
|
|||
1. Turn on caching via the flag `--check-query-cache-enabled`. This will reduce latency of requests, but it will increase the staleness of OpenFGA's responses. (The TTL is configurable). | |||
1. Turn on caching in Check API via flags. This will reduce latency of requests, but it will increase the staleness of OpenFGA's responses. Please see [Cache Expiration](../interacting/consistency.mdx#cache-expiration) for details on the flags. |
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 🤔
@@ -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 comment
The 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 comment
The 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 👍
|
||
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 comment
The 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?
No description provided.