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
These settings are shared across all cache drivers. If `CACHE_ENABLED` is disabled, settings marked with **superscript 5** may be used by Directus's caching system. This behavior cannot be turned off.
22
+
::
23
+
20
24
::callout{icon="material-symbols:info-outline"}
21
25
**Assets Cache**
22
26
`Cache-Control` and `Last-Modified` headers for the `/assets` endpoint are separate from the regular data-cache.
23
27
`Last-Modified` comes from `modified_on` DB field. This is useful as it's often possible to cache assets for far longer
24
28
than you would cache database content. To learn more, see [Files](/configuration/files).
|`CACHE_ENABLED`| Whether or not data caching is enabled. |`false`|
30
-
|`CACHE_TTL`<sup>[1]</sup> | How long the data cache is persisted. |`5m`|
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`|
37
-
|`CACHE_SCHEMA_SYNC_TIMEOUT`| How long to wait for other containers to message before trying again |`10000`|
38
-
|`CACHE_SCHEMA_FREEZE_ENABLED`| Whether or not to freeze the schema to improve memory efficiency | false |
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`|
41
-
|`CACHE_STATUS_HEADER`| If set, returns the cache status in the configured header. One of `HIT`, `MISS`. | -- |
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
-
|`CACHE_SKIP_ALLOWED`| Whether requests can use the Cache-Control header with `no-store` to skip data caching. | false |
44
-
|`CACHE_HEALTHCHECK_THRESHOLD`| Healthcheck timeout threshold in ms. |`150`|
|`CACHE_ENABLED`| Whether or not data caching is enabled. |`false`|
34
+
|`CACHE_TTL`<sup>[1]</sup> | How long the data cache is persisted. |`5m`|
35
+
|`CACHE_CONTROL_S_MAXAGE`| Whether to not to add the `s-maxage` expiration flag. Set to a number for a custom value. |`0`|
36
+
|`CACHE_AUTO_PURGE`<sup>[2]</sup> | Automatically purge the data cache on actions that manipulate the data. |`false`|
37
+
|`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`|
38
+
|`CACHE_SYSTEM_TTL`<sup>[4]</sup><sup>[5]</sup>| How long `CACHE_SCHEMA` is persisted. | -- |
39
+
|`CACHE_SCHEMA`<sup>[4]</sup> | Whether or not the database schema is cached. One of `false`, `true`|`true`|
40
+
|`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`|
41
+
|`CACHE_SCHEMA_SYNC_TIMEOUT`| How long to wait for other containers to message before trying again |`10000`|
42
+
|`CACHE_SCHEMA_FREEZE_ENABLED`| Whether or not to freeze the schema to improve memory efficiency | false |
43
+
|`CACHE_NAMESPACE`<sup>[5]</sup>| How to scope the cache data. |`system-cache`|
44
+
|`CACHE_STORE`<sup>[5]</sup> | Where to store the cache data. Either `memory`, `redis`. |`memory`|
45
+
|`CACHE_STATUS_HEADER`| If set, returns the cache status in the configured header. One of `HIT`, `MISS`. | -- |
46
+
|`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 |
47
+
|`CACHE_SKIP_ALLOWED`| Whether requests can use the Cache-Control header with `no-store` to skip data caching. | false |
48
+
|`CACHE_HEALTHCHECK_THRESHOLD`| Healthcheck timeout threshold in ms. |`150`|
45
49
46
50
<sup>[1]</sup> `CACHE_TTL` Based on your project's needs, you might be able to aggressively cache your data, only
47
51
requiring new data to be fetched every hour or so. This allows you to squeeze the most performance out of your Directus
0 commit comments