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

XF 1.1 Setting Up Frontent Cache

Discussion in 'Troubleshooting and Problems' started by yavuz, Jan 27, 2012.

  1. yavuz

    yavuz Well-Known Member

    I went to the User Manual for Caching (xenforo.com/help/cache/)

    Is there anything else to do other than pasting this code below in order to set up frontent cache?

    Code:
    $config['cache']['enabled'] = true;
    $config['cache']['frontend'] = 'Core';
    $config['cache']['frontendOptions']['cache_id_prefix'] = 'xf_';
    When I past this code above, I'm getting this "unexpected error". This is currently how my config.php looks like:

    Code:
    $config['db']['host'] = 'localhost';
     
    $config['db']['port'] = '3306';
     
    $config['db']['username'] = 'user';
     
    $config['db']['password'] = 'pass';
     
    $config['db']['dbname'] = 'dbname';
     
    $config['superAdmins'] = '1';
     
    //config['debug'] = true;
     
    $config['cache']['backend'] = 'Memcached';
    $config['cache']['backendOptions'] = array(
        'backendOptions'=>array(
                'servers' =>array(
                                array(
                                    'host' => '127.0.0.3', // your memcached server ip /address
                                    'port' => 11211        // memcached port
                                )
                            ),
                'compression' => false
        )
    );
     
  2. Mike

    Mike XenForo Developer Staff Member

    Your Memcached server probably isn't right. Without the lines you pasted initially, it isn't even being used.
     
  3. wrx1

    wrx1 Active Member

    You also need to remove the 2nd backend options.


    Code:
    $config['cache']['backendOptions'] = array(
        'backendOptions'=>array(  -NOT NEEDED
                'servers' =>array(
                                array(
    I think Kier fixed the cache docs, so I would go check that again.
     
  4. Mike

    Mike XenForo Developer Staff Member

    Good catch.
     
  5. yavuz

    yavuz Well-Known Member

    It seems that I have not configured memcached, I followed this article.

    Memcached is now running:

    root@server1 [~]# netstat -tulpn | grep :11211
    tcp 0 0 127.0.0.3:11211 0.0.0.0:* LISTEN 1463/memcached
    udp 0 0 127.0.0.3:11211 0.0.0.0:* 1463/memcached

    No longer getting errors with the revised memcached.
     

Share This Page