From e4fbb49f38dcda84fce9bc00b70d1a6b1a252a0d Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Fri, 8 Sep 2023 16:40:48 +0200 Subject: fix(autoloader): no apcu no side effects apcu lead to side effects especially with app management and (soft) inter-dependencies, and lead also to 500 server errors. While we could add management to clear apcu cache in many cases (may stil leave edge cases) the performance benefit is marginally as also class maps are already cached in opcache. Hence, the simple and effective way to go is to not use apcu for autoloading. Signed-off-by: Arthur Schiwon --- lib/private/legacy/OC_Util.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/private/legacy') diff --git a/lib/private/legacy/OC_Util.php b/lib/private/legacy/OC_Util.php index 833fb994ec4..3400940a054 100644 --- a/lib/private/legacy/OC_Util.php +++ b/lib/private/legacy/OC_Util.php @@ -326,9 +326,10 @@ class OC_Util { return; } + $timestamp = filemtime(OC::$SERVERROOT . '/version.php'); require OC::$SERVERROOT . '/version.php'; /** @var int $timestamp */ - self::$versionCache['OC_Version_Timestamp'] = \OC::$VERSION_MTIME; + self::$versionCache['OC_Version_Timestamp'] = $timestamp; /** @var string $OC_Version */ self::$versionCache['OC_Version'] = $OC_Version; /** @var string $OC_VersionString */ -- cgit v1.2.3