mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/15246] Allow use of Unix socket as memcache(d) host
PHPBB3-15246
This commit is contained in:
parent
1c4f49249f
commit
c255e1fae8
2 changed files with 4 additions and 4 deletions
4
phpBB/phpbb/cache/driver/memcache.php
vendored
4
phpBB/phpbb/cache/driver/memcache.php
vendored
|
@ -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;
|
||||
}
|
||||
|
|
4
phpBB/phpbb/cache/driver/memcached.php
vendored
4
phpBB/phpbb/cache/driver/memcached.php
vendored
|
@ -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]));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue