XF 1.2 How to properly enable memcached and apc?

rdn

Well-known member
This is my config right now:
PHP:
<?php

// Cache
$config['cache']['enabled'] = true;
$config['cache']['cacheSessions'] = true;
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions'] = array('caching'  =>  true,
                                            'automatic_serialization' => true,
                                            'lifetime'    => 3600,
                                            'cache_id_prefix'  =>  'phcn_'
);
// MemCache
$config['cache']['backend'] = 'Memcached';
$config['cache']['backendOptions'] = array(
    'compression' => false,
    'servers' => array(
        array(
           
            'host' => '127.0.0.1',
            'port' => 11211,
        )
    )
);
// End of Memcache
$config['cache']['backend'] = 'Apc';
But I cannot see it working on my memcache admin:

upload_2014-1-16_16-46-10.webp
 
No, this isn't recommended. Remove/disable APC, build/install the Zend OPCache extension and then restart PHP (check your config files and make sure they're all OK).

You know what is a difference between Op Cache an User Cache? The old APC has both. The new php 5.5 has only opcache. So the question is. Is it better for Xenforo to use the php5.5 opcache + a userCache?
 
php -v
PHP 5.5.8 (cli) (built: Jan 17 2014 00:56:58)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
with Zend OPcache v7.0.3-dev, Copyright (c) 1999-2013, by Zend Technologies
 
I'm on PHP Version 5.4.24, have both memcached and APC installed on my server, it's showing up also in phpinfo, do I need also memcached configured in config.php?

I have these values as cache defined:

Code:
$config['cache']['enabled'] = true;
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions']['cache_id_prefix'] = 'xf_';
$config['cache']['backend'] = 'Apc';
 
I'm on PHP Version 5.4.24, have both memcached and APC installed on my server, it's showing up also in phpinfo, do I need also memcached configured in config.php?

I have these values as cache defined:

Code:
$config['cache']['enabled'] = true;
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions']['cache_id_prefix'] = 'xf_';
$config['cache']['backend'] = 'Apc';
Memcache is not use base on your config, you may remove APC line and include Memcache.
// Memcache
$config['cache']['backend'] = 'Libmemcached';
$config['cache']['backendOptions'] = array(
'compression' => false,
'servers' => array(
array(
'host'=>'127.0.0.1',
'port'=>'11211',
'persistent' => 'true'
))
);
// End Memcache
 
Top Bottom