XF 1.3 Memcache Session Purging

Brent W

Well-known member
I store sessions in memcache and have noticed that quite a lot of memory is being used for memcache now.

Check the following screenshots:

Screenshot 2014-02-19 03.23.55.png Screenshot 2014-02-19 04.31.57.png

Does this seem normal? 8 and 9 have over 20k items and the age is quite long. If you click on them it all shows session info. Not really sure what most of this means so if anyone can shed some light that would be great.

Here is my setting in config.php

$config['cache']['enabled'] = true;
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions'] = array('caching'  =>  true,
                                            'automatic_serialization' => true,
                                            'cache_id_prefix'  =>  'aspies_'
$config['cache']['cacheSessions'] = true;
$config['cache']['backend'] = 'Memcached';
$config['cache']['backendOptions'] = array(
            'servers' =>array(
                                'host' => '', // your memcached server ip /address
                                'port' => 11211        // memcached port
            'compression' => false
I use this same setup, minus the prefix for each site on the server.


XenForo developer
Staff member
As Memcache uses a least-recently used pruning mechanism and your cache isn't full, it's possible that it simply hasn't decided to purge the data since it doesn't need to.

By default, sessions are only valid for an hour (without being touched again), so they should be purgable after that time.