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



Well-known member

I'm trying to get xcache working on our vps, I'm a newb with servers so bare with me, so far I've got the following working in config:

$config['cache']['enabled'] = true;
$config['cache']['cacheSessions'] = true;
$config['cache']['backend'] = 'File';
$config['cache']['backendOptions'] ['cache_dir'] = '/var/www/vhosts/mysite.co.uk/httpdocs/ct_cache';
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions'] ['cache_id_prefix'] = 'xf_';
which does fill up that directory

but if i try

$config['cache'] = array(
    'enabled' => true,
    'frontend' => 'Core',
    'frontendOptions' => array(
            'caching' => true,
            'automatic_serialization' => false,
            'cache_id_prefix' => 'xf_',
            'lifetime' => 18000
    'backend' => 'Xcache',
    'backendOptions' => array(),
    'cacheSessions' => true
I get an An unexpected error occurred. Please try again later. with the second as it seems to not like the backend' => 'Xcache', bit.

Is there any advantage to the latter code?


Well-known member
If you have Xcache installed, you don't need to actually set anything in the config.php file, as it's an opcode cache, which will automatically cache compiled php pages.

On your VPS, how is apache running, suPHP/FCGI/DSO?


Well-known member
This is now sorted. The problem was with the xcache settings, and by default not having anything allocated to var


This has been set, and the site is now using Xcache.