From be0be62d46eedb81d9cdef55f6e47219ff1af5f4 Mon Sep 17 00:00:00 2001 From: Maria Ines Parnisari Date: Thu, 9 Jan 2025 14:38:44 -0300 Subject: [PATCH] chore: remove defaults for caching parameters --- .../setup-openfga/configure-openfga.mdx | 2 +- docs/content/interacting/consistency.mdx | 20 +++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/content/getting-started/setup-openfga/configure-openfga.mdx b/docs/content/getting-started/setup-openfga/configure-openfga.mdx index 3b4495819..fcbc324c8 100644 --- a/docs/content/getting-started/setup-openfga/configure-openfga.mdx +++ b/docs/content/getting-started/setup-openfga/configure-openfga.mdx @@ -25,7 +25,7 @@ You can configure the OpenFGA server in three ways: If the same option is configured in multiple ways the command line parameters will take precedence over environment variables, which will take precedence over the configuration file. -The configuration options and their default values are defined in [config-schema.json](https://github.com/openfga/openfga/blob/main/.config-schema.json). +The configuration options and their default values are shown via `openfga run --help`, and defined in [config-schema.json](https://github.com/openfga/openfga/blob/main/.config-schema.json). ## Using a configuration file diff --git a/docs/content/interacting/consistency.mdx b/docs/content/interacting/consistency.mdx index f041707b9..14549190d 100644 --- a/docs/content/interacting/consistency.mdx +++ b/docs/content/interacting/consistency.mdx @@ -53,16 +53,16 @@ if (date_modified + cache_time_to_live_period > Date.now()) { caching is disabled by default. When caching is disabled, all queries will have strong consistency regardless of the consistency mode specified. When caching is enabled, the cache will be used for queries with `MINIMIZE_LATENCY` consistency mode. -You can use the following parameters to configure 's cache: - -| Name | Description | -|----------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| check-cache-limit | Configures the number of items that will be kept in the in-memory cache used to resolve Check queries (default = 1000) | -| check-query-cache-enabled | Enables in-memory caching of Check subproblems (default = false). For example, if you have a relation `define viewer: owner or editor`, and the query is `Check(user:anne, viewer, doc:1)`, we'll evaluate the `owner` relation and the `editor` relation and cache both results: `(user:anne, viewer, doc:1) -> allowed=true` and `(user:anne, owner, doc:1) -> allowed=true`. | -| check-query-cache-ttl | Specifies the time that items will be kept in the cache of Check subproblems (default = 10s) | -| check-iterator-cache-enabled | Enables in-memory caching of database iterators. Each iterator is the result of a database query, for example, usersets related to a specific object, or objects related to a specific user, up to a certain number of tuples per iterator (default = false) | -| check-iterator-cache-max-results | Configures the number of tuples that will be stored for each database iterator (default = 10000) | -| check-iterator-cache-ttl | Specifies the time that items will be kept in the cache of database iterators (default = 10s) | +You can use the following command line parameters to configure 's cache. To see the default value of each parameter, please run `openfga run --help`. + +| Name | Description | +|----------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| check-cache-limit | Configures the number of items that will be kept in the in-memory cache used to resolve Check queries | +| check-query-cache-enabled | Enables in-memory caching of Check subproblems. For example, if you have a relation `define viewer: owner or editor`, and the query is `Check(user:anne, viewer, doc:1)`, we'll evaluate the `owner` relation and the `editor` relation and cache both results: `(user:anne, viewer, doc:1) -> allowed=true` and `(user:anne, owner, doc:1) -> allowed=true`. | +| check-query-cache-ttl | Specifies the time that items will be kept in the cache of Check subproblems | +| check-iterator-cache-enabled | Enables in-memory caching of database iterators. Each iterator is the result of a database query, for example, usersets related to a specific object, or objects related to a specific user, up to a certain number of tuples per iterator | +| check-iterator-cache-max-results | Configures the number of tuples that will be stored for each database iterator | +| check-iterator-cache-ttl | Specifies the time that items will be kept in the cache of database iterators | Learn how to [configure ](../getting-started/setup-openfga/configure-openfga.mdx).