Commit 7041e1b8 authored by ='s avatar =
Browse files

#1095608 by catch: fix simpletest compatibility.

parent 597718bf
......@@ -328,6 +328,11 @@ function dmemcache_key($key, $bin = 'cache') {
if ($prefix = variable_get('memcache_key_prefix', '')) {
$prefix .= '-';
}
// When simpletest is running, emulate the simpletest database prefix here
// to avoid the child site setting cache entries in the parent site.
if (isset($GLOBALS['drupal_test_info']['test_run_id'])) {
$prefix .= $GLOBALS['drupal_test_info']['test_run_id'];
}
}
$full_key = urlencode($prefix . $bin . '-' . $key);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment