I am using pressflow having varnish + boost + memcache and also using cloudflare caching, I have seen some variable forms of settings.php file on forums and I am confused whether mine is optimal for best usage of all these caching mechanism :

# Varnish reverse proxy on localhost
$conf['reverse_proxy'] = TRUE;           
$conf['reverse_proxy_addresses'] = array(''); 

# Memcached configuration
$conf['cache_inc'] = './sites/all/modules/memcache/memcache.inc';
$conf['memcache_servers'] = array(
         '' => 'default',
### END Mercury settings written on 2011-11-01T07:12:49-04:00

Unless you are doing something quite unique, using boost & varnish is usually overkill. If you have varnish setup exactly how you want it, I would just use varnish.

Here is an example settings.php. It is a multisite safe memcache configuration thanks to the memcache_key_prefix setting.

// Skip db query that checks for blocked IP's.
$conf['blocked_ips'] = array();

// Reverse proxy settings.
$conf['reverse_proxy'] = TRUE;
$conf['reverse_proxy_addresses'] = array(
  '',    // Localhost

// Use memcache for caches, locks, and sessions.
$conf['cache_inc'] = './sites/all/modules/memcache/memcache.inc';
$conf['lock_inc'] = './sites/all/modules/memcache/memcache-lock.inc';
$conf['session_inc'] = './sites/all/modules/memcache/memcache-session.inc';

// Memcache Settings.
// Set memcache server.
$conf['memcache_servers'] = array(
  '' => 'default',
// Set memcache bins.
$conf['memcache_bins'] = array(
  'cache' => 'default',
  'cache_form' => 'database',
// Set memcache prefix to be the location of the settings.php file.
$conf['memcache_key_prefix'] = basename(realpath(conf_path()));
// Try to use a persistent connection.
$conf['memcache_persistent'] = TRUE;
  • Absolutely agree. Having both boost and varnish is pointless. – Mike Oct 30 '12 at 21:48
  • 1
    I like the blocked IPs trick. – mpdonadio Nov 2 '12 at 22:34
  • If only I could upvote this configuration more than once! :) – Professor Falken Oct 22 '14 at 23:35

Earlier it was believed that Boost+Varnish do work good if configured correctly - Is it redundant to use the "boost" module if varnish is used?, has this changed by recent developments.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.