Created
March 7, 2011 22:13
-
-
Save dashr/859382 to your computer and use it in GitHub Desktop.
only use memcached plugin if memcached responds
This file contains 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
/** | |
* Use Memcached (if its on): | |
* | |
* Enable these configurations if a Memcached server is running on the | |
* server. This will move the database load from MySQL to Memcached, | |
* increasing the site speed and lowering the database lag. | |
* | |
* cache_inc = replaces the Drupal caching mechanism | |
* session_inc = replaces the Drupal mysqldb Sessions handler | |
* memcache_key_prefix should be set to a short unique string in multi Drupal environment | |
* | |
*/ | |
if (@memcache_connect('127.0.0.1',11211) !== false) { | |
$conf['cache_inc'] = './sites/all/modules/memcache/memcache.inc'; | |
$conf['session_inc'] = './sites/all/modules/memcache/memcache-session.inc'; | |
$conf['memcache_key_prefix']= 'live'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment