25 if (!$config->memcache || empty($config->memcache_servers)) {
30 foreach ($config->memcache_servers as
$server) {
32 'host' =>
'127.0.0.1',
35 'saslPassword' =>
false,
38 if (array_key_exists(
'host', $server)) {
40 $server_config = array_merge($server_config, $server);
43 elgg_deprecated_notice(
"Memcache server({$server[0]}) configuration format has been changed. Please update the configuration in elgg-config/settings.php",
'4.2');
45 $server_config[
'host'] = $server[0];
46 $server_config[
'port'] = $server[1];
52 $opt_prefix = (string) $config->memcache_namespace_prefix;
53 $opt_prefix .= $namespace;
57 'preventCacheSlams' =>
true,
58 'useStaticItemCaching' =>
true,
59 'itemDetailedDate' =>
true,
60 'optPrefix' => $opt_prefix,
static fromElggConfig(string $namespace,\Elgg\Config $config)
Factory to return a config object to be used when starting a driver.
elgg_deprecated_notice(string $msg, string $dep_version)
Log a notice about deprecated use of a function, view, etc.
Configuration for memcache(d) fastcache driver.
$config
Advanced site settings, debugging section.