I've got APC up and running on my VPS and have installed the APC module on my Drupal 7 site. I followed the documentation here and added this code to my settings.php file:
$conf['cache_backends'] = array('sites/all/modules/apc/drupal_apc_cache.inc');
$conf['cache_default_class'] = 'DrupalAPCCache';
//$conf['apc_show_debug'] = TRUE; // Remove the slashes to use debug mode.
However, on my site's status page under APC, it says:
APC has been running for 3 min 54 sec. Currently caching 0 entries (0 bytes).
To me the "0 entries" indicated that there was no cache being created / used. I did some digging around and it looks like there might be additional code I need to add but cannot find documentation anywhere.
I found this snippet but not really sure if I need it or what part it I am supposed to use and what it does, I could not find any documentation for this. I suspect this is what makes the cache work.
'page_cache_without_database' => TRUE,
'page_cache_invoke_hooks' => FALSE,
'page_cache_maximum_age' => 3600,
'cache_lifetime' => 0,
/* my note -- noticed "cacherouter" in the path below
so I am guessing this needs to be adapeted to the path for APC?? */
'session_inc' => './sites/all/modules/cacherouter/session.inc',
'cache_default_class' => 'DrupalAPCCache',
'cache_class_cache' => 'DrupalAPCCache',
'cache_class_cache_block' => 'DrupalAPCCache',
'cache_class_cache_bootstrap' => 'DrupalAPCCache',
'cache_class_cache_content' => 'DrupalAPCCache',
'cache_class_cache_filter' => 'DrupalAPCCache',
'cache_class_cache_form' => 'DrupalAPCCache',
'cache_class_cache_menu' => 'DrupalAPCCache',
'cache_class_cache_page' => 'DrupalAPCCache',
'cache_class_cache_pathdst' => 'DrupalAPCCache',
'cache_class_cache_pathsrc' => 'DrupalAPCCache',
'cache_class_cache_session' => 'DrupalAPCCache',
'cache_class_cache_session_user' => 'DrupalAPCCache',
'cache_class_cache_update' => 'DrupalAPCCache',
'cache_class_cache_users' => 'DrupalAPCCache',
'cache_class_cache_views' => 'DrupalAPCCache',
'cache_class_cache_views_data' => 'DrupalAPCCache',
);
Any help on this matter would be appreciated.
The information about the APC extension returned from phpinfo()
are the following ones.