docs: add caching parameters to EE docs

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9077
Co-authored-by: Sean Park-Ross <94021366+seanparkross@users.noreply.github.com>
GitOrigin-RevId: ca0456e6a2592e8b4269ecec046f0c1a4364c2cd
This commit is contained in:
Anon Ray 2023-05-16 13:37:28 +05:30 committed by hasura-bot
parent d55c664d83
commit af68742666

View File

@ -59,3 +59,15 @@ HASURA_GRAPHQL_RATE_LIMIT_REDIS_USE_TLS="true"
HASURA_GRAPHQL_RATE_LIMIT_REDIS_URL="redis://username:password@redishostname:port"
HASURA_GRAPHQL_RATE_LIMIT_REDIS_TLS_HOSTNAME="redishostname"
```
## Tune caching parameters
You can tune the various caching parameters according to your use-case. For example, you can configure the maximum
TTL allowed, the max entry size in the cache etc.
| Env var | Flag | Description |
|---------------------------------------|--------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `HASURA_GRAPHQL_CACHE_MAX_ENTRY_TTL` | `--query-cache-max-ttl` | Maximum TTL allowed in seconds. Clients can request TTL via the `@cached` directive. But an upper limit can be set using this setting. Default: 600 seconds |
| `HASURA_GRAPHQL_CACHE_MAX_ENTRY_SIZE` | `--query-cache-max-entry-size` | Maximum size of the response that is allowed to be cached (in MB). default: 1 MB |
| `HASURA_GRAPHQL_CACHE_BUCKET_RATE` | `--query-cache-bucket-rate` | Recharge rate for the Query Response Cache token bucket. Default: 100,000 bytes/second |
| `HASURA_GRAPHQL_CACHE_BUCKET_SIZE` | `--query-cache-bucket-size` | Maximum capacity in bytes for the Query Response Cache token bucket algorithm. See https://hasura.io/docs/latest/queries/response-caching for more info. Default: 10000000000 bytes (1gb) |