diff options
Diffstat (limited to 'classes/Memcached_DataObject.php')
-rw-r--r-- | classes/Memcached_DataObject.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/classes/Memcached_DataObject.php b/classes/Memcached_DataObject.php index e3e7d0440..7ca2c7db2 100644 --- a/classes/Memcached_DataObject.php +++ b/classes/Memcached_DataObject.php @@ -73,9 +73,15 @@ class Memcached_DataObject extends DB_DataObject return NULL; } else { $cache = new Memcache(); - $res = $cache->connect(common_config('memcached', 'server'), - common_config('memcached', 'port')); - return ($res) ? $cache : NULL; + $servers = common_config('memcached', 'server'); + if (is_array($servers)) { + foreach($servers as $server) { + $cache->addServer($server); + } + } else { + $cache->addServer($servers); + } + return $cache; } } |