Hi,

I'm using this great module only with apc. I'm pointing "only" because I wonder if I can add memcache acceleration too.

Since apc and memcache work in a different manner, can be a good idea (a reasonable one) using them together?

If the answer is yes, how should I configure settings.php to achieve these two types of acceleration?

Comments

aze2010’s picture

subscribing...do andybody knows that?

thedavidmeister’s picture

Status: Active » Fixed

Just configure each "bin" you want to point to different caches.

I use APC for the op-code caching and memcache for the Drupal cache bin caching at the same time.

Just set the "engine" key of the bin to either "memcache" or "apc" as required.

My (limited) testing shows that memcache is a little faster than APC for Drupal cache bins, so that's why I've set myself up this way.

Status: Fixed » Closed (fixed)

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

raulmuroc’s picture

Version: 6.x-1.0-rc2 » 7.x-1.x-dev
Status: Closed (fixed) » Active

@thedavidmeister, could youo include a brief guide to set up both modules together?

It would be really useful.

Thank you.

thedavidmeister’s picture

Status: Active » Fixed

Step 1: Install APC and configure it in php.ini

Step 2: Install memcache, configure it in php.ini and get at least one memcache daemon running on a local port (like 11211)

Step 3: Install Cache Router

Step 4: In the configuration of Cache Router do something like this example which puts the cache_views table in APC and everything else in memcache (adapted from the project front page):

$conf['cache_inc'] = './sites/all/modules/contrib/cacherouter/cacherouter.inc';
$conf['cacherouter'] = array(
  'default' => array(
    'engine' => 'memcache',
    'servers' => array('localhost:11211'),
    'shared' => TRUE,
    'prefix' => '',
    'static' => FALSE,
    'fast_cache' => FALSE,
  ),
  'cache_views' => array(
    'engine' => 'apc',
    'static' => FALSE,
    'fast_cache' => FALSE,
  ),
);

PS - Don't do exactly this, keep cache_form at least out of memcache as it's not really a "cache" that memcache can drop when it feels like. Stick it in file caching or something..

Status: Fixed » Closed (fixed)

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