aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acm
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/acm')
-rw-r--r--phpBB/includes/acm/acm_memcache.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/phpBB/includes/acm/acm_memcache.php b/phpBB/includes/acm/acm_memcache.php
index 52b8832749..5a96509d38 100644
--- a/phpBB/includes/acm/acm_memcache.php
+++ b/phpBB/includes/acm/acm_memcache.php
@@ -37,6 +37,11 @@ if (!defined('PHPBB_ACM_MEMCACHE_HOST'))
define('PHPBB_ACM_MEMCACHE_HOST', 'localhost');
}
+if (!defined('PHPBB_ACM_MEMCACHE')){
+ //can define multiple servers with host1::port1,host2::port2 format
+ define('PHPBB_ACM_MEMCACHE', PHPBB_ACM_MEMCACHE_HOST . '::' . PHPBB_ACM_MEMCACHE_PORT);
+}
+
/**
* ACM for Memcached
* @package acm
@@ -54,7 +59,10 @@ class acm extends acm_memory
parent::acm_memory();
$this->memcache = new Memcache;
- $this->memcache->connect(PHPBB_ACM_MEMCACHE_HOST, PHPBB_ACM_MEMCACHE_PORT);
+ foreach(explode(',', PHPBB_ACM_MEMCACHE) as $u){
+ $parts = explode('::', $u);
+ $this->memcache->addServer($parts[0], $parts[1]);
+ }
$this->flags = (PHPBB_ACM_MEMCACHE_COMPRESS) ? MEMCACHE_COMPRESSED : 0;
}
@@ -125,4 +133,4 @@ class acm extends acm_memory
}
}
-?> \ No newline at end of file
+?>