Cache engine fallback

I am planning to use the cache engine automatic failover function in the application under development. I am doing the setting as below, but it will not work well.

When CACHE_HOST 1 goes down, an error message “_ cake_model_ cache was unable to write” is displayed and the application goes down.

Of course, even if you exchange CACHE_HOST 2 and CACHE_HOST 1, the same result will be obtained.

What kind of setting should be done for the new function “cache engin fallback” of CakePHP 3.5 to operate properly?

The development environment is CakePHP 3.5.11.

[Setting content]
$ cache = [
‘default’ => [
‘className’ => ‘File’,
‘path’ => CACHE,
],
/ **
* Configure the cache used for general framework caching.
* Translation cache files are stored with this configuration.
* Duration will be set to ‘+2 minutes’ in bootstrap.php when debug = true
* If you set ‘className’ => ‘Null’ core cache will be disabled.
* /
// Cache settings for CakeCore
cake_core’ => [
‘className’ => ‘Cake \ Cache \ Engine \ MemcachedEngine’,
‘prefix’ => ‘saltcrm_cake_core_’,
‘duration’ => env (‘CACHE_DURATION_CAKE’),
‘username’ => env (‘CACHE_USER’),
‘host’ => env (‘CACHE_HOST 1’),
# ‘servers’ => [
# env (‘CACHE_HOST 1’). ‘:’. env (‘CACHE_PORT’),
#],
‘fallback’ => ‘cake_core_fallback’,
],
/ * Behavior of fallback could not be confirmed Comment out * /
‘cake_core_fallback’ => [
‘className’ => ‘Cake \ Cache \ Engine \ MemcachedEngine’,
‘prefix’ => ‘saltcrm_cake_core_’,
‘duration’ => env (‘CACHE_DURATION_CAKE’),
‘username’ => env (‘CACHE_USER’),
‘servers’ => [
env (‘CACHE_HOST 2’). ‘:’. env (‘CACHE_PORT’),
],
],
/ **
* Configure the cache for model and datasource caches. This cache
* configuration is used to store schema descriptions, and table listings
* in connections.
* Duration will be set to ‘+2 minutes’ in bootstrap.php when debug = true
* /
// Cache settings for model
cake_model ’ => [
‘className’ => ‘Cake \ Cache \ Engine \ MemcachedEngine’,
‘prefix’ => 'saltcrm_cake_model
’,
‘duration’ => env (‘CACHE_DURATION_CAKE’),
‘username’ => env (‘CACHE_USER’),
‘host’ => env (‘CACHE_HOST 1’),
# ‘servers’ => [
# env (‘CACHE_HOST 1’). ‘:’. env (‘CACHE_PORT’),
#],
‘fallback’ => ‘cake_core_fallback’
],
/ * Behavior of fallback could not be confirmed Comment out * /
‘cake_model_fallback’ => [
‘className’ => ‘Cake \ Cache \ Engine \ MemcachedEngine’,
‘prefix’ => 'saltcrm_cake_model
’,
‘duration’ => env (‘CACHE_DURATION_CAKE’),
‘username’ => env (‘CACHE_USER’),
‘servers’ => [
env (‘CACHE_HOST 2’). ‘:’. env (‘CACHE_PORT’),
],
],
// Cache settings for session
cake_session ’ => [
‘className’ => ‘Cake \ Cache \ Engine \ MemcachedEngine’,
‘prefix’ => 'salcrm_sess
’,
‘duration’ => env (‘CACHE_DURATION_SESSION’),
‘username’ => env (‘CACHE_USER’),
‘host’ => env (‘CACHE_HOST 1’),
# ‘servers’ => [
# env (‘CACHE_HOST 1’). ‘:’. env (‘CACHE_PORT’),
#],
‘fallback’ => ‘cake_session_fallback’
],
/ * Behavior of fallback could not be confirmed Comment out * /
‘cake_session_fallback’ => [
‘className’ => ‘Cake \ Cache \ Engine \ MemcachedEngine’,
‘prefix’ => 'salcrm_sess
’,
‘duration’ => env (‘CACHE_DURATION_SESSION’),
‘username’ => env (‘CACHE_USER’),
‘servers’ => [
env (‘CACHE_HOST 2’). ‘:’. env (‘CACHE_PORT’),
],
],
];
return [
‘Cache’ => $ cache,
];