• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Configuration for memcached and php 7

rhodes

Active member
#1
Hello,

I have memcached installed on my server (PHP 7) and would like to use memcached as my xenforo cache.

This is my config.php setting

Code:
if (extension_loaded('memcached')) {
    $config['cache']['backend'] = 'Memcached';
    $config['cache']['backendOptions'] = array(
            'servers' =>array(
                    array(
                            'host' => '127.0.0.1', // your memcached server ip /address
                            'port' => 11211        // memcached port
                    )
            ),
            'compression' => false
    );
}
However, I do not realize any increase in performance. Did I miss sth? Any ideas how can I test if XF uses memcached?
 

Kirby

Well-known member
#3
I wonder if this configuration does would work at all:
Zend_Cache_Backend_Memcached uses php_memcache, not php_memcached.

If you want to use php_memcached, it should be
PHP:
if (extension_loaded('memcached')) {
    $config['cache']['backend'] = 'Libmemcached';