add the server roots and version info hash to apcu prefix

fixes collissions when more than one instance is running on the same
system

For the memcaches we use a more complex prefix, where version and
instance ID are incorporated. We do not have this data at hand at this
point of time. But we can get the mtime of the version.php file
relatively cheap.

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
pull/37853/head
Arthur Schiwon 1 year ago committed by Arthur Schiwon (Rebase PR Action)
parent dd3d689e04
commit 7519949f37

@ -601,7 +601,7 @@ class OC {
// Add default composer PSR-4 autoloader
self::$composerAutoloader = require_once OC::$SERVERROOT . '/lib/composer/autoload.php';
self::$composerAutoloader->setApcuPrefix('composer_autoload');
self::$composerAutoloader->setApcuPrefix('composer_autoload_' . md5(OC::$SERVERROOT . '_' . filemtime(OC::$SERVERROOT . '/version.php')));
try {
self::initPaths();

Loading…
Cancel
Save