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

XF 1.3 Memcache Session Purging

Discussion in 'XenForo Questions and Support' started by BamaStangGuy, Feb 19, 2014.

  1. BamaStangGuy

    BamaStangGuy 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

    Code:
    $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(
                                array(
                                    'host' => '127.0.0.1', // 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.
     
  2. Mike

    Mike 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.
     

Share This Page