php Acquia D7示例Memcache配置

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php Acquia D7示例Memcache配置相关的知识,希望对你有一定的参考价值。

/**
 * @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';
}

以上是关于php Acquia D7示例Memcache配置的主要内容,如果未能解决你的问题,请参考以下文章

sh Flush Acquia memcache

Composer 读取错误的 PHP 版本(Windows 上的 ACQUIA DEV DESKTOP)

Drupal.info示例

Memcache php配置

php_memcache 下载-安装-配置-学习

php扩展memcached和memcache的安装配置方法