/**
* @file
* Contains Drupal 7 Acquia memcache configuration.
*/
if (getenv('AH_SITE_ENVIRONMENT') &&
isset($conf['memcache_servers'])
) {
$conf['memcache_extension'] = 'Memcached';
$conf['cache_backends'][] = DRUPAL_ROOT . '/sites/all/modules/memcache/memcache.inc';
$conf['cache_default_class'] = 'MemCacheDrupal';
$conf['cache_class_cache_form'] = 'DrupalDatabaseCache';
$conf['memcache_stampede_protection_ignore'] = array(
// Ignore some cids in 'cache_bootstrap'.
'cache_bootstrap' => array(
'module_implements',
'variables',
'lookup_cache',
'schema:runtime:*',
'theme_registry:runtime:*',
'_drupal_file_scan_cache',
),
// Ignore all cids in the 'cache' bin starting with 'i18n:string:'
'cache' => array(
'i18n:string:*',
),
// Disable stampede protection for the entire 'cache_path' and 'cache_rules'
// bins.
'cache_path',
'cache_rules',
);
# Move semaphore out of the database and into memory for performance purposes
$conf['lock_inc'] = DRUPAL_ROOT . '/sites/all/modules/custom/memcache/memcache-lock.inc';
}
/**
* @file
* Example implementation of ACSF post-settings-php hook.
*
* @see https://docs.acquia.com/site-factory/tiers/paas/workflow/hooks
*/
// The path to this file should be docroot/factory-hooks/post-settings-php/memcache.php
// Use ACSF internal settings site flag to apply memcache settings.
if (getenv('AH_SITE_ENVIRONMENT') &&
isset($site_settings['flags']['memcache_enabled']) &&
isset($conf['memcache']['servers'])
) {
require '[path-to-project-settings]/memcacheD7.settings.php';
}