APCu - Alternative PHP User Cache for ChainedFastBackend

Component ID

2789571

Component name

APCu - Alternative PHP User Cache for ChainedFastBackend

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Downloads

758

Component created

Component changed

Component body

This allows to use the apcu.so php extension with https://www.drupal.org/project/chained_fast module.

It also includes the Symfony apcu-polyfill, which makes it work for both apc and apcu module.

Compared to https://www.drupal.org/project/apc this backend is very stripped down to the bare basics and is pretty similar to the Drupal 8 APCuCacheBackend.php.

While the original APC module has special drush integration to ensure that actions affecting the cache during 'cli' operation are synchronized with the web backend APCu, this module relies on chained_fast to do so.

Warning: Use this module _only_ in combination with https://www.drupal.org/project/chained_fast or else cache synchronization between cli and web won't work.

To use put into settings.php:

$conf['cache_backends'][] = 'sites/all/modules/contrib/apcu/apcu.cache.inc';
$conf['cache_backends'][] = 'sites/all/modules/contrib/chained_fast/chained_fast.cache.inc';

// Chained fast configuration.
$conf['chained_fast']['fast_backend'] = 'DrupalAPCuCache';

// Cache class configuration - This uses chained_fast for all caches except the form cache. This might not be suitable for all sites, but is a good default.
$conf['cache_default_class'] = 'ChainedFastBackend';
$conf['cache_class_cache_form'] = 'DrupalDatabaseCache';