2

I had the APC PHP extension enabled it it seems to work well. I had 0.0% misses and not much fragmentation. Then I installed the APC module with:

$conf['cache_backends'][] = 'sites/all/modules/apc/drupal_apc_cache.inc';
$conf['cache_class_cache'] = 'DrupalAPCCache';
$conf['cache_class_cache_bootstrap'] = 'DrupalAPCCache';

in settings.php. After that the fragmentation becomes enormous and I can't see any performance loss when I disable the module again, but with it is actually enabled I get annoying messages when I use drush. So what exactly is the advantage of using that module?

1 Answer 1

10

Using APC with PHP and the APC module are two totally different things.

APC for PHP caches the opcode for files. Essentially, when PHP executes a page, it compiles all of the code into opcode. APC caches this, so the next time a file gets used, it can skip the compilation step. This can cause tremendous speed increases in a complex PHP application like Drupal. Running Drupal without APC enabled is a bad idea.

The APC Module is an alternative cache backend for Drupal. Out of the box, Drupal caches data in the database. The APC Module lets Drupal cache the data in the APC user cache. As with everything, tuning APC is essential to getting this to work well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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