mirror of
https://github.com/directus/directus.git
synced 2026-01-22 18:37:55 -05:00
Align memcached configurations for multiple hosts (#7986)
* align memcached configurations for multiple hosts * update reference
This commit is contained in:
@@ -57,7 +57,12 @@ function getConfig(store: 'memory' | 'redis' | 'memcache' = 'memory', ttl: numbe
|
||||
|
||||
if (store === 'memcache') {
|
||||
const KeyvMemcache = require('keyv-memcache');
|
||||
config.store = new KeyvMemcache(env.CACHE_MEMCACHE);
|
||||
|
||||
// keyv-memcache uses memjs which only accepts a comma separated string instead of an array,
|
||||
// so we need to join array into a string when applicable. See #7986
|
||||
const cacheMemcache = Array.isArray(env.CACHE_MEMCACHE) ? env.CACHE_MEMCACHE.join(',') : env.CACHE_MEMCACHE;
|
||||
|
||||
config.store = new KeyvMemcache(cacheMemcache);
|
||||
}
|
||||
|
||||
return config;
|
||||
|
||||
@@ -143,9 +143,9 @@ Alternatively, you can provide the individual connection parameters:
|
||||
|
||||
### Memcache
|
||||
|
||||
| Variable | Description | Default Value |
|
||||
| ----------------------- | ---------------------------------- | ------------- |
|
||||
| `RATE_LIMITER_MEMCACHE` | Location of your memcache instance | --- |
|
||||
| Variable | Description | Default Value |
|
||||
| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
|
||||
| `RATE_LIMITER_MEMCACHE` | Location of your memcache instance. You can use [`array:` syntax](#environment-syntax-prefix), eg: `array:<instance-1>,<instance-2>` for multiple memcache instances. | --- |
|
||||
|
||||
::: tip Additional Rate Limiter Variables
|
||||
|
||||
@@ -191,9 +191,9 @@ Alternatively, you can provide the individual connection parameters:
|
||||
|
||||
### Memcache
|
||||
|
||||
| Variable | Description | Default Value |
|
||||
| ---------------- | ---------------------------------- | ------------- |
|
||||
| `CACHE_MEMCACHE` | Location of your memcache instance | --- |
|
||||
| Variable | Description | Default Value |
|
||||
| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
|
||||
| `CACHE_MEMCACHE` | Location of your memcache instance. You can use [`array:` syntax](#environment-syntax-prefix), eg: `array:<instance-1>,<instance-2>` for multiple memcache instances. | --- |
|
||||
|
||||
## Sessions
|
||||
|
||||
@@ -225,9 +225,9 @@ Alternatively, you can provide the individual connection parameters:
|
||||
|
||||
### Memcache
|
||||
|
||||
| Variable | Description | Default Value |
|
||||
| ------------------------ | ---------------------------------- | ------------- |
|
||||
| `SESSION_MEMCACHE_HOSTS` | Location of your memcache instance | --- |
|
||||
| Variable | Description | Default Value |
|
||||
| ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
|
||||
| `SESSION_MEMCACHE_HOSTS` | Location of your memcache instance. You can use [`array:` syntax](#environment-syntax-prefix), eg: `array:<instance-1>,<instance-2>` for multiple memcache instances. | --- |
|
||||
|
||||
### Database
|
||||
|
||||
|
||||
Reference in New Issue
Block a user