We are using the AuthCache module which offers page caching for both anonymous users and logged-in authenticated users under the Memcache engine. We wanted to use the Memcache API as it allows for clustering and multiple bin support.

However, when the AuthCache module is installed along with the Memcache API, the AuthCache module will not read in it's $conf requirements, thus fails.

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.

NOTE: I have reported the bug with the AuthCache module as it is part of this problem as well -- http://drupal.org/node/495478

AuthCache $conf settings
===================
$conf['cache_inc'] = './modules/authcache/api/authcache.inc';
$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)
),
);

Memcache API $conf settings
======================
$conf = array(
'cache_inc' => './modules/memcache/memcache.inc',

'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',
),
);

Comments

slantview’s picture

Status: Active » Closed (works as designed)

Hi,

This is unfortunately not a bug, but rather part of the system architecture. You can only override the cache with one cache api module. Authcache and Memcache API are mutually exclusive. However, Authcache is based on CacheRouter which allows you to use memcached as your backend or "engine" for caching.

In order to make this work, you will need to remove the Memcache API settings, and apply the settings for CacheRouter style bins. See http://drupal.org/project/cacherouter for more information on how to configure your bins.