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

Do I need zend for cache?

#1
Hello Do I need to install zend for cache?

I have memcache on my server but I removed zend,

When I add this code to my config

Code:
$config['cache']['enabled'] = true;
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions'] = array('caching'  =>  true,
                                            'automatic_serialization' => true,
                                            'lifetime'    => 1800
);
$config['cache']['backend'] = 'Memcached';
$config['cache']['backendOptions'] = array(
    'backendOptions'=>array(
            'servers' =>array(
                            array(
                                'host' => 'localhost', // your memcached server ip /address
                                'port' => 11211        // memcached port
                            )
                        ),
            'compression' => false
    )
);
My forum gives an error which is Unexpected error occured vsvs

To get rid of this Do I need to install zend or there is something bad in the code?

Thank you very much
 

Jake Bunce

XenForo moderator
Staff member
#2
Zend is not needed. The popular caching system is APC which confers immediate performance benefit by way of opcode caching once it's installed, and it doesn't require any special configuration in XF... just install APC in PHP and that's it. Additional configuration is only needed if you want to implement a forum cache.

Since you are trying to setup memcache...

When I add this code to my config

Code:
$config['cache']['enabled'] = true;
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions'] = array('caching'  =>  true,
                                            'automatic_serialization' => true,
                                            'lifetime'    => 1800
);
$config['cache']['backend'] = 'Memcached';
$config['cache']['backendOptions'] = array(
    'backendOptions'=>array(
            'servers' =>array(
                            array(
                                'host' => 'localhost', // your memcached server ip /address
                                'port' => 11211        // memcached port
                            )
                        ),
            'compression' => false
    )
);
My forum gives an error which is Unexpected error occured vsvs
Your code is wrong. Refer to the memcache example in the manual:

http://xenforo.com/help/cache/

Just copy the code on that page for the frontend and memcache backend.