From 7519949f372c82c6b529766ca2eb48398e62776b 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 9c588bdaa76..ced5433a57e 100644 --- a/lib/base.php +++ b/lib/base.php @@ -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();