Advertisement
Guest User

Untitled

a guest
Jan 29th, 2015
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. // Memcache config
  2. $conf['cache_backends'][] = 'sites/all/modules/memcache/memcache.inc';
  3. $conf['cache_default_class'] = 'MemCacheDrupal';
  4. $conf['cache_class_cache_form'] = 'DrupalDatabaseCache';
  5. $memcache_servers = array(
  6. '10.201.61.131:11211' => 'default',
  7. '10.201.61.132:11211' => 'default',
  8. );
  9.  
  10. $conf['memcache_servers'] = array();
  11.  
  12.  
  13. // Connect to the local memcache server first.
  14. $key = $_SERVER['SERVER_ADDR'] . ':11211';
  15. if (isset($memcache_servers[$key])) {
  16. $conf['memcache_servers'] += array(
  17. $key => $memcache_servers[$key],
  18. );
  19. }
  20. // Add the rest of the servers into the mix.
  21. $conf['memcache_servers'] += $memcache_servers;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement