XF 1.1 Setting Up Frontent Cache

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
    )
);
 
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.
 
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.
 
Top Bottom