Hello,
I have installed Memcache API and Integration and Authcache how do I now make is setting the settings.php it. I have adjusted the settings as described here.

But I get error message "Your settings.php file must be modified to enable Authcache ($ conf ['cache_inc']). See README.txt."

What am I doing wrong.

Here is my setting

$conf['cache_inc'] = './sites/all/modules/memcache/memcache.inc';
$conf['memcache_servers'] = array(
   '127.0.0.1:11211' => 'default',
   );

$conf['memcache_bins'] = array(
   'cache' => 'default',
   'cache_block' => 'default',
   'cache_content' => 'default',
   'cache_filter' => 'default',
   'cache_form' => 'default',
   'cache_menu' => 'default',
   'cache_page' => 'default',
   'cache_update' => 'default',
   'cache_views' => 'default'
 );

$conf['authcache'] = array(
  'default' => array(
    'engine' => 'memcache',
    'server' => array('127.0.0.1:11211'),
    'shared' => TRUE,
    'prefix' => '',
    'path' => 'files/filecache',
    'static' => FALSE,
  ),
);

Sorry for my bad english

Many Thanks

Comments

abx’s picture

Replace this line

$conf['cache_inc'] = './sites/all/modules/memcache/memcache.inc';

With

$conf['cache_inc'] = './sites/all/modules/authcache/authcache.inc';

You may also need this line if Authcache doesn't pick up Memcache setting automatically

$conf['cache_inc_via_authcache'] = './sites/all/modules/memcache/memcache.inc';
fugazi’s picture

many thanks for the help, I'll test it

drupalninja99’s picture

Is there a way to use memcache for everything but cache_page? I like having cache_page in the database bc then I can more granularly delete single rows.

Here's how I attempted to do this:

$conf['cache_inc'] = './sites/all/modules/contrib/authcache/authcache.inc';
$conf['cache_inc_via_authcache'] = './sites/all/modules/contrib/memcache/memcache.inc';
 
$conf['memcache_servers'] = array('staging-945:11211' => 'default');
 
$conf['memcache_bins'] = array(
   'cache' => 'default',
   'cache_block' => 'default',
   'cache_content' => 'default',
   'cache_filter' => 'default',
   'cache_form' => 'none',
   'cache_menu' => 'default',
   'cache_page' => 'none',
   'cache_update' => 'default',
   'cache_views' => 'default'
 );
                                                                              
$conf['authcache'] = array(
  'default' => array(
    'engine' => 'db',
  ),
);

I have a feeling the authcache deal is ignoring my db config. Is this even possible?

abx’s picture

What version of Memcache? With 1.9, it uses 'database' instead of 'none'. Below is what I took from README.

Here is an example configuration where the 'cache_form' bin is set to bypass
memcache and use the standard table-based Drupal cache by assigning it to a
cluster called 'database'.

$conf = array(
  ...
  'memcache_servers' => array('10.0.0.1:11211' => 'default'),
  'memcache_bins' => array('cache' => 'default',
                           'cache_form' => 'database'),
);
drupalninja99’s picture

OK I can try that, so basically I wouldn't need the $conf['authcache'] line in that case, right? Authcache would point to memcache and memcache would point to the db for those 2 tables. That would be great if that worked.

drupalninja99’s picture

Interesting, getting an error "Fatal error: Call to undefined function db_fetch_object() in ....sites/all/modules/contrib/memcache/database.inc" - I think I discovered a bug. I filed an issue here: http://drupal.org/node/1240568

I patched that .inc with a boostrap for the db and I believe I have it working now! With your fix memcache appears to be doing its think (using memcache_admin for debugging) and authcache appears to be using the database correctly (also with authcache debug turned on).

And so in my estimation I have the best of both worlds. That is bc with authcache using the db I can use the rules module to clear out specific pages on demand.

simg’s picture

Status: Active » Closed (fixed)