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

xcache

Discussion in 'Server Configuration and Hosting' started by Mark3121, Nov 28, 2012.

  1. Mark3121

    Mark3121 Well-Known Member

    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?
     
  2. MattW

    MattW 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?
     
  3. MattW

    MattW Well-Known Member

    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.
     
    Mark3121 likes this.
  4. Mark3121

    Mark3121 Well-Known Member

    Big thanks to Matt for sorting our server out (y)
     
    MattW likes this.

Share This Page