diff --git a/README.txt b/README.txt index 47be483..599f33d 100644 --- a/README.txt +++ b/README.txt @@ -141,16 +141,14 @@ drupal_page_footer()/module_implements_write_cache(). Allow to disable the protection for those cases. $conf['memcache_stampede_protection_ignore'] = array( - // Ignore the entire cache_render bin. - 'cache_render', // Ignore some CIDs of cache_bootstrap. 'cache_bootstrap' => array( 'module_implements', 'variables' ), - // Ignore all CIDs starting with 'i18n:' + // Ignore all CIDs starting with 'i18n:string:' 'cache' => array( - 'i18n:*', + 'i18n:string:*', ), ); diff --git a/memcache.inc b/memcache.inc index bd470c9..c5e3c34 100644 --- a/memcache.inc +++ b/memcache.inc @@ -495,7 +495,20 @@ class MemCacheDrupal implements DrupalCacheInterface { * bin/cid, otherwise FALSE. */ protected function stampedeProtected($cid) { - $ignore_settings = variable_get('memcache_stampede_protection_ignore', array()); + $ignore_settings = variable_get('memcache_stampede_protection_ignore', array( + // Ignore some CIDs of cache_bootstrap. + 'cache_bootstrap' => array( + // The module_implements cache is written after finishing the request. + 'module_implements', + // Variables have their own protection. + 'variables' + ), + // Ignore all CIDs starting with 'i18n:' + 'cache' => array( + // I18n is a class destructor to write the cache. + 'i18n:string:*', + ), + )); // Support ignoring an entire bin. if (in_array($this->bin, $ignore_settings)) {