Since authcache cannot currently handle table caching, the memcache module is also utilized to provide this added functionality. However, if both are enabled in the settings.php file, the authcache module will not read in the $conf for its needs.

$conf['cache_inc'] = './modules/authcache/api/';
$conf['authcache'] = array(
'default' => array(
'engine' => 'memcache', // apc, memcache, db, file, eacc or xcache
'server' => array('localhost:11220'), // memcached (host:port, e..g, 'localhost:11211')
'shared' => TRUE, // memcached shared single process
'prefix' => '', // cache key prefix (for multiple sites)
'path' => 'files/filecache', // file engine cache location
'static' => TRUE, // static array cache (advanced)

$conf = array(
'cache_inc' => './modules/memcache/',

'memcache_servers' => array(
'localhost:11211' => 'default',
'localhost:11212' => 'block',
'localhost:11213' => 'content',
'localhost:11214' => 'filter',
'localhost:11215' => 'form',
'localhost:11216' => 'menu',
'localhost:11217' => 'page',
'localhost:11218' => 'update',
'localhost:11219' => 'views',

'memcache_bins' => array(
'cache' => 'default',
'cache_block' => 'block',
'cache_content' => 'content',
'cache_filter' => 'filter',
'cache_form' => 'form',
'cache_menu' => 'menu',
'cache_page' => 'page',
'cache_update' => 'update',
'cache_views' => 'views',

I also tried this for using the APC engine as well for the authcache, but the same error appears:

Authcache settings.php Not enabled
The settings.php file must be modified to support the Auchache API. See README.txt


However, if you which around the placement of the $conf (where AuthCache $conf is seen first), then the Memcache API $conf is not read in, thus disabled.

Assigned:Unassigned» Jonah Ellison

The difficulty here is that Drupal only allows one contributed cache module. Authcache uses CacheRouter for its caching, so technically it should already be caching tables since this is what CacheRouter does.

You are correct about your settings being overridden. The Memcache $conf array is overriding the Auchache settings. You should define the keys on separate lines, like $conf['memcache_servers'] = .... $conf[''memcache_bins'], etc, to avoid this.

Theoretically, you should be able to use the Memcache module and Authcache together (note that I haven't tested this). First, remove the $conf['cache_inc'] = './modules/authcache/api/' line. Then you will need to modify Memcache's file to use Authcache's page_cache_fastpath() function (this function serves pages from the cache). See for the code. Remove the $cache variable, remove if ($cache->page_fast_cache('cache_page')), and replace $cache->get(..) with cache_get(...)

Status:Needs review» Active

Well, theoretically -- it actually worked. I made the changes to the file as you has said and added in the Authcache's page_cache_fastpath() function. I then created a new configuration layout and now both memcache and authcache modules (and features) can be utilized at the same time.

$conf['cache_inc'] = './sites/all/modules/memcache/';
$conf['memcache_servers'] = array(
   '' => 'default',
   '' => 'block',
   '' => 'content',
   '' => 'filter',
   '' => 'form',
   '' => 'menu',
   '' => 'page',
   '' => 'update',
   '' => 'views'
$conf['memcache_bins'] = array(
   'cache' => 'default',
   'cache_block' => 'block',
   'cache_content' => 'content',
   'cache_filter' => 'filter',
   'cache_form' => 'form',
   'cache_menu' => 'menu',
   'cache_page' => 'page',
   'cache_update' => 'update',
   'cache_views' => 'views'
$conf['memcache_key_prefix'] = 'test';
$conf['authcache'] = array(
  'default' => array(
    'engine' => 'memcache',
    'server' => array('localhost:11220'),
    'shared' => TRUE,
    'prefix' => 'test',
    'path' => 'files/filecache',
    'static' => FALSE,

Since our Drupal development team are having problems with the 'modules' page for how long it takes to do a authenticated user (admin) refresh under D6 (there is something like 20+ modules being used), I used it as a control base for my tests.

D6 w/ no caching enabled: 4 minutes
D6 w/ Drupal caching enabled: 3.5 minutes
D6 w/ Memcache API enabled: 2.5 minutes
D6 w/ AuthCache enabled: 3 minutes
D6 w/ Memcache Multi-Instance enabled: 1.5 minutes
D6 w/ patch added (Memcache + Authcache) enabled: 45 seconds

The front page of the D6 site was also pressing it a bit for all of the blocks and views that are laid out.
NOTE: Times given are until the entire page is rendered with external ads calls turned off.

D6 w/ no caching enabled: 75 seconds
D6 w/ Drupal caching enabled: 45 seconds
D6 w/ Memcache API enabled: 25 seconds
D6 w/ AuthCache enabled: 15 seconds
D6 w/ Memcache Multi-Instance enabled: 8 seconds
D6 w/ patch added (Memcache + Authcache) enabled: 3 seconds <-- For an authenticated user (admin)
D6 w/ patch added (Memcache + Authcache) enabled: 1.5 seconds <-- For an un-authenticated user

Status:Active» Needs review
new3.91 KB

Patch attached

Title:Cannot use authcache and memcache modules togetherAuthcache and memcache module integration
Status:Active» Fixed

Thanks for posting this. Authcache beta7 now integrates with the Memcache module. No need to hack the module. (If you upgrade to beta7, you'll need to remove the changes from

With the beta7 patch, does this also reflect that both modules (i.e. Authcache, memcache_admin) can be enabled as well? Cause before it would allow only one or the other to be enabled prior to the duality patch.

Yep! Both can be enabled at the same time, though $conf['cache_inc'] has to be checks to see if $conf['memcache_servers'] is defined, and if it is, it includes and uses Memcache's caching system instead of Cache Router.

For those that are wondering about the multi-instance of memcached setup (it really created a huge performance boost for larger Drupal sites), I am attaching the modified init file [based on RedHat/CentOS/Fedora] and the settings.php modifier for combining both Authcache and Memcache API together based on the new beta7 format.

Status:Fixed» Closed (fixed)
Issue tags:-settings.php, -authcache, -memcache

Automatically closed -- issue fixed for 2 weeks with no activity.