DrupalAPCCache::getPrefixSettingsForBin() contains the following code.
$prefixes = variable_get('cache_prefix', '');
if (is_string($prefixes)) {
// Variable can be a string, which then considered as a default behavior.
return $prefixes;
}
if (isset($prefixes[$bin])) {
if (FALSE !== $prefixes[$bin]) {
// If entry is set and not FALSE, an explicit prefix is set for the bin.
return $prefixes[$bin];
}
else {
// If we have an explicit false, it means no prefix whatever is the
// default configuration.
return '';
}
}
else {
// Key is not set, we can safely rely on default behavior.
if (isset($prefixes['default']) && FALSE !== $prefixes['default']) {
return $prefixes['default'];
}
else {
// When default is not set or an explicit FALSE, this means no prefix.
return '';
}
}
variable_get('cache_prefix', '') tries to get a value that neither Drupal core nor this module set, with the consequence that the used prefix will always be an empty string. The documentation for this module does not say that $conf['cache_prefix'] can be set for multi-site installations to avoid they share the same cached values. If a site uses $conf['cache_prefix'] is just because somebody read the code and noticed that variable_get('cache_prefix', '') is used from the module.
The code needs to first check $conf['apc_cache_prefix'] has been set; if it has not been set, check whether $conf['cache_prefix'] has been set.
The prefix should be build from one of those values.
Issue fork apc-3462780
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
avpadernoComment #4
avpadernoComment #6
avpaderno