Anyone know how to configure C5 to use memcache as the default? Assuming memcache servers are NOT running on the same box (so, connect to a pool of memcache servers)?

Thanks in advance.


View Replies:
Remo replied on at Permalink Reply
It's not something I'm using, but try something like this:

define('CACHE_LIBRARY', 'memcached');
define('CACHE_BACKEND_OPTIONS', serialize(array(array('host' => 'localhost', 'port' => 11211, 'persistent' => true, 'weight' => 1, 'timeout' => 5, 'retry_interval' => 15, 'status' => true, 'failure_callback' => '' ))));

put these lines in config/site.php and concrete5 should be looking for a memcached server on localhost.

there are two constants CACHE_BACKEND_OPTIONS and CACHE_FRONTEND_OPTIONS which you can use to serialize Zend Cache settings. Check this page if you need for information about the options you can specify:

But keep in mind that Zend Cache has less use in 5.6.1 (the upcoming release of concrete5). It might be a waste of time to look into memcached as some of my testsites run a lot better with 5.6.1.