You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`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`|
31
31
|`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`|
37
37
|`CACHE_SCHEMA_SYNC_TIMEOUT`| How long to wait for other containers to message before trying again |`10000`|
38
38
|`CACHE_SCHEMA_FREEZE_ENABLED`| Whether or not to freeze the schema to improve memory efficiency | false |
39
39
|`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`|
41
41
|`CACHE_STATUS_HEADER`| If set, returns the cache status in the configured header. One of `HIT`, `MISS`. | -- |
42
42
|`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 |
43
43
|`CACHE_SKIP_ALLOWED`| Whether requests can use the Cache-Control header with `no-store` to skip data caching. | false |
44
44
|`CACHE_HEALTHCHECK_THRESHOLD`| Healthcheck timeout threshold in ms. |`150`|
45
45
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
47
49
requiring new data to be fetched every hour or so. This allows you to squeeze the most performance out of your Directus
48
50
instance. This can be incredibly useful for applications where you have a lot of (public) read-access and where updates
49
51
aren't real-time (for example a website). `CACHE_TTL` uses [`ms`](https://www.npmjs.com/package/ms) to parse the value,
50
52
so you configure it using human readable values (like `2 days`, `7 hrs`, `5m`).
51
53
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
53
55
benefits on quick subsequent reads.
54
56
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
56
58
`CACHE_AUTO_PURGE_IGNORE_LIST`.
57
59
58
-
<sup>[4]</sup> Not affected by the `CACHE_ENABLED` value.
60
+
<sup>[5]</sup> Not affected by the `CACHE_ENABLED` value.
59
61
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.
61
63
Instead, you can use the above `CACHE_STORE` environment variable to use `redis` as the cache store.
0 commit comments