From bc6f7af091debecb1fcd713526642dc7d5e64e57 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Thu, 20 Apr 2023 23:10:34 +0200 Subject: [PATCH] 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 --- lib/base.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/base.php b/lib/base.php index 8b95437cb23..6d46396552d 100644 --- a/lib/base.php +++ b/lib/base.php @@ -598,7 +598,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();