Skip to content

Commit 97c5928

Browse files
document fully disabling cache
1 parent 9ee8b17 commit 97c5928

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

content/configuration/cache.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,36 +26,38 @@ than you would cache database content. To learn more, see [Files](/configuration
2626

2727
| Variable | Description | Default Value |
2828
| -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
29-
| `CACHE_ENABLED` | Whether or not data caching is enabled. | `false` |
30-
| `CACHE_TTL`<sup>[1]</sup> | How long the data cache is persisted. | `5m` |
29+
| `CACHE_ENABLED`<sup>[1]</sup> | Whether or not data caching is enabled. | `false` |
30+
| `CACHE_TTL`<sup>[2]</sup> | How long the data cache is persisted. | `5m` |
3131
| `CACHE_CONTROL_S_MAXAGE` | Whether to not to add the `s-maxage` expiration flag. Set to a number for a custom value. | `0` |
32-
| `CACHE_AUTO_PURGE`<sup>[2]</sup> | Automatically purge the data cache on actions that manipulate the data. | `false` |
33-
| `CACHE_AUTO_PURGE_IGNORE_LIST`<sup>[3]</sup> | List of collections that prevent cache purging when `CACHE_AUTO_PURGE` is enabled. | `directus_activity,directus_presets` |
34-
| `CACHE_SYSTEM_TTL`<sup>[4]</sup> | How long `CACHE_SCHEMA` is persisted. | -- |
35-
| `CACHE_SCHEMA`<sup>[4]</sup> | Whether or not the database schema is cached. One of `false`, `true` | `true` |
36-
| `CACHE_SCHEMA_MAX_ITERATIONS`<sup>[4]</sup> | Safe value to limit max iterations on get schema cache. This value should only be adjusted for high scaling applications. | `100` |
32+
| `CACHE_AUTO_PURGE`<sup>[3]</sup> | Automatically purge the data cache on actions that manipulate the data. | `false` |
33+
| `CACHE_AUTO_PURGE_IGNORE_LIST`<sup>[4]</sup> | List of collections that prevent cache purging when `CACHE_AUTO_PURGE` is enabled. | `directus_activity,directus_presets` |
34+
| `CACHE_SYSTEM_TTL`<sup>[5]</sup> | How long `CACHE_SCHEMA` is persisted. | -- |
35+
| `CACHE_SCHEMA`<sup>[5]</sup> | Whether or not the database schema is cached. One of `false`, `true` | `true` |
36+
| `CACHE_SCHEMA_MAX_ITERATIONS`<sup>[5]</sup> | Safe value to limit max iterations on get schema cache. This value should only be adjusted for high scaling applications. | `100` |
3737
| `CACHE_SCHEMA_SYNC_TIMEOUT` | How long to wait for other containers to message before trying again | `10000` |
3838
| `CACHE_SCHEMA_FREEZE_ENABLED` | Whether or not to freeze the schema to improve memory efficiency | false |
3939
| `CACHE_NAMESPACE` | How to scope the cache data. | `system-cache` |
40-
| `CACHE_STORE`<sup>[5]</sup> | Where to store the cache data. Either `memory`, `redis`. | `memory` |
40+
| `CACHE_STORE`<sup>[6]</sup> | Where to store the cache data. Either `memory`, `redis`. | `memory` |
4141
| `CACHE_STATUS_HEADER` | If set, returns the cache status in the configured header. One of `HIT`, `MISS`. | -- |
4242
| `CACHE_VALUE_MAX_SIZE` | Maximum size of values that will be cached. Accepts number of bytes, or human readable string. Use `false` for no limit | false |
4343
| `CACHE_SKIP_ALLOWED` | Whether requests can use the Cache-Control header with `no-store` to skip data caching. | false |
4444
| `CACHE_HEALTHCHECK_THRESHOLD` | Healthcheck timeout threshold in ms. | `150` |
4545

46-
<sup>[1]</sup> `CACHE_TTL` Based on your project's needs, you might be able to aggressively cache your data, only
46+
<sup>[1]</sup> `CACHE_ENABLED` applies only to the data cache. Because the system cache also depends on the configured cache driver, you must set `CACHE_ENABLED=false`, `CACHE_SCHEMA=false`, and `CACHE_PERMISSIONS=false` to fully disable all caching.”
47+
48+
<sup>[2]</sup> `CACHE_TTL` Based on your project's needs, you might be able to aggressively cache your data, only
4749
requiring new data to be fetched every hour or so. This allows you to squeeze the most performance out of your Directus
4850
instance. This can be incredibly useful for applications where you have a lot of (public) read-access and where updates
4951
aren't real-time (for example a website). `CACHE_TTL` uses [`ms`](https://www.npmjs.com/package/ms) to parse the value,
5052
so you configure it using human readable values (like `2 days`, `7 hrs`, `5m`).
5153

52-
<sup>[2]</sup> `CACHE_AUTO_PURGE` allows you to keep the Directus API real-time, while still getting the performance
54+
<sup>[3]</sup> `CACHE_AUTO_PURGE` allows you to keep the Directus API real-time, while still getting the performance
5355
benefits on quick subsequent reads.
5456

55-
<sup>[3]</sup> The cache has to be manually cleared when requiring to access updated results for collections in
57+
<sup>[4]</sup> The cache has to be manually cleared when requiring to access updated results for collections in
5658
`CACHE_AUTO_PURGE_IGNORE_LIST`.
5759

58-
<sup>[4]</sup> Not affected by the `CACHE_ENABLED` value.
60+
<sup>[5]</sup> Not affected by the `CACHE_ENABLED` value.
5961

60-
<sup>[5]</sup> `CACHE_STORE` For larger projects, you most likely don't want to rely on local memory for caching.
62+
<sup>[6]</sup> `CACHE_STORE` For larger projects, you most likely don't want to rely on local memory for caching.
6163
Instead, you can use the above `CACHE_STORE` environment variable to use `redis` as the cache store.

0 commit comments

Comments
 (0)