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

xcache

Mark3121

Well-known member
#1
Hi,

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:

PHP:
$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

Code:
$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?
 

MattW

Well-known member
#2
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?
 

MattW

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

xcache_settings.PNG

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