Need help with cache setup

Ludachris

Well-known member
I need to get this figured out and quit guessing on the config. I'm running XF 1.5 and PHP 5.6.36. I'm attempting to use a combination of Memcached and OPcache. Here is my config file:
Code:
$config['cache']['enabled'] = true;
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions']['cache_id_prefix'] = 'xf_';
$config['cache']['backend'] = 'Memcached';
$config['cache']['backendOptions'] = array(
    'compression' => false,
    'servers' => array(
        array(
            // your memcached server IP /address
            'host' => 'localhost',
            
            // memcached port
            'port' => 11211,
        )
    )
);
The host says Memcached doesn't appear that it's being used, though it's installed. I've asked them to check to make sure it's the PHP extension. The phpinfo file says memcache version 2.2.7 is installed.

What do I need to do to fix it and get cache working?
 

fotografik

Active member
The host says Memcached doesn't appear that it's being used, though it's installed. I've asked them to check to make sure it's the PHP extension. The phpinfo file says memcache version 2.2.7 is installed.

What do I need to do to fix it and get cache working?
I am pretty sure that the extension should be memcached and not just memcache in the phpinfo page. It should also reference libmemcached in the phpinfo (my phpinfo section on memcached below):

screenshot.png
 

Ludachris

Well-known member
I now have both loaded. Does Memcached need the SASL support enabled?

How do I ensure it's working correctly? I am still getting pages that error out when trying to load, but then they load automatically. It's strange. This is intermittent.

Also, I have another small forum site on the same server running XF 1.5 and I tried adding the same caching code to that config file and I get 503 errors when trying to load that forum.
 

andybond

Well-known member
Do you have the facility to rebuild?

If you do I would strongly suggest trying centminmod.

Its lightening fast out of the box and easily update-able even for a Wintel admin like myself!
 
Top