1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-04-08 01:44:07 +02:00

Merge pull request #4850 from rxu/ticket/15246

[ticket/15246] Allow use of Unix socket as memcache(d) host
This commit is contained in:
Marc Alexander 2017-06-25 10:32:35 +02:00
commit ea8334b693
No known key found for this signature in database
GPG Key ID: 50E0D2423696F995
2 changed files with 4 additions and 4 deletions

View File

@ -52,8 +52,8 @@ class memcache extends \phpbb\cache\driver\memory
$this->memcache = new \Memcache;
foreach (explode(',', PHPBB_ACM_MEMCACHE) as $u)
{
$parts = explode('/', $u);
$this->memcache->addServer(trim($parts[0]), trim($parts[1]));
preg_match('#(.*)/(\d+)#', $u, $parts);
$this->memcache->addServer(trim($parts[1]), (int) trim($parts[2]));
}
$this->flags = (PHPBB_ACM_MEMCACHE_COMPRESS) ? MEMCACHE_COMPRESSED : 0;
}

View File

@ -67,8 +67,8 @@ class memcached extends \phpbb\cache\driver\memory
foreach (explode(',', PHPBB_ACM_MEMCACHE) as $u)
{
$parts = explode('/', $u);
$this->memcached->addServer(trim($parts[0]), trim($parts[1]));
preg_match('#(.*)/(\d+)#', $u, $parts);
$this->memcache->addServer(trim($parts[1]), (int) trim($parts[2]));
}
}