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
 
So this is now my config:
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_'
);

// APC
$config['cache']['backend'] = 'Apc';

// 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

Memcache Stats:
upload_2014-1-16_23-7-26.webp

APC Stats:
upload_2014-1-16_23-8-38.webp
 
Yeah, that will remove it from use. The files etc will still be on the server, as the are put there by centminmod when it installs it. There is no overhead to leaving them there, other than the small amount of space they are using.
 
  • Like
Reactions: rdn
From one of my PHP upgrades
Code:
*************************************************
* Updating php.ini...
*************************************************
old php.ini will be saved at /usr/local/lib/php.ini-oldversion_301213-235705
if you have modified your old php.ini i.e. installed and loaded
APC, Xcache, Memcache or Suhosin - please re-install them after php upgrade
...
 
Top Bottom