Created
October 29, 2012 16:50
-
-
Save benclark/3974821 to your computer and use it in GitHub Desktop.
Memcache config for settings.php (D6)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Memcache config | |
*/ | |
// Check that one of the two memcache extensions are loaded. | |
if (extension_loaded('memcache') || extension_loaded('memcached')) { | |
if (!is_array($conf)) { | |
$conf = array(); | |
} | |
// Change cache_inc to use the memcache backend. | |
$conf['cache_inc'] = './sites/all/modules/contrib/memcache/memcache.inc'; | |
// Configure memcache servers. | |
$conf['memcache_servers'] = array( | |
'<<MEMCACHE SERVER GOES HERE>>:11211' => 'default', | |
); | |
// Configure memcache bins. | |
$conf['memcache_bins'] = array( | |
'cache' => 'default', | |
// Use database backend for these schema, as they frequently exceed the | |
// memcached insert size limit: | |
'cache_form' => 'database', | |
'cache_menu' => 'database', | |
'cache_page' => 'database', | |
'cache_views' => 'database', | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment