- 🇬🇧United Kingdom slejnej
Hello,
any news on this? We are using D10.2 with php8.1 and saving menu, or any admin settings changes do not clear memcached.
Thanks
- 🇮🇳India rifas-ali-pbi Kerala
Hai even we had this issue. And it took us a while to debug this issue. We did two things.
1) Made AWS elastic host into 2 nodes.
2) Then used those 2 nodes in settings.phpBelow is the configuration code for the memcache.
$memcache_hosts = getenv('MEMCACHED_HOST') ?: 'memcached'; $memcache_port = getenv('MEMCACHE_PORT') ?: '11211'; // Shared Memcache server definition $memcache_servers = []; foreach (explode(',', $memcache_hosts) as $host) { $host = trim($host); if (!empty($host)) { $memcache_servers["{$host}:{$memcache_port}"] = 'default'; } if (getenv('ENV') == 'prod') { $config['config_split.config_split.local']['status'] = FALSE; $config['config_split.config_split.acceptance']['status'] = FALSE; $config['config_split.config_split.prod']['status'] = TRUE; //Memcache configs $settings['memcache']['servers'] = $memcache_servers; $settings['memcache']['bins'] = ['default' => 'default']; $settings['memcache']['key_prefix'] = 'MigrationYorkshire'; $settings['cache']['default'] = 'cache.backend.memcache'; $settings['cache']['bins']['render'] = 'cache.backend.memcache'; $settings['cache']['bins']['dynamic_page_cache'] = 'cache.backend.memcache'; $settings['cache']['bins']['data'] = 'cache.backend.memcache'; $settings['cache']['bins']['entity'] = 'cache.backend.memcache'; $settings['cache']['bins']['menu'] = 'cache.backend.memcache'; $settings['cache']['bins']['page'] = 'cache.backend.memcache'; $settings['cache']['bins']['bootstrap'] = 'cache.backend.database'; $settings['cache']['bins']['discovery'] = 'cache.backend.database'; $settings['cache']['bins']['config'] = 'cache.backend.database'; $settings['container_yamls'][] = DRUPAL_ROOT . '/sites/default/memcache.services.yml'; } }