From 8216dcc6e5088d8ffc35697a047e6cbe0f38e80b Mon Sep 17 00:00:00 2001 From: Martin <31348196+Earl0fPudding@users.noreply.github.com> Date: Fri, 13 Feb 2026 16:25:09 +0100 Subject: [PATCH] feat: Add memcache_customprefix Signed-off-by: Martin <31348196+Earl0fPudding@users.noreply.github.com> [skip ci] --- lib/private/Memcache/Factory.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/private/Memcache/Factory.php b/lib/private/Memcache/Factory.php index 23e0550f62eeb..adb420518568f 100644 --- a/lib/private/Memcache/Factory.php +++ b/lib/private/Memcache/Factory.php @@ -129,7 +129,7 @@ protected function getGlobalPrefix(): string { // Include instanceid in the prefix, in case multiple instances use the same cache (e.g. same FPM pool) $instanceid = $config->getValue('instanceid'); $installedApps = implode(',', array_keys($versions)) . implode(',', array_values($versions)); - $this->globalPrefix = hash('xxh128', $instanceid . $installedApps); + $this->globalPrefix = $customprefix . hash('xxh128', $instanceid . $installedApps); } return $this->globalPrefix; } @@ -143,6 +143,8 @@ protected function getGlobalPrefix(): string { public function withServerVersionPrefix(\Closure $closure): void { $backupPrefix = $this->globalPrefix; + $config = Server::get(SystemConfig::class); + $customprefix = $config->getValue('memcache_customprefix', ''); // Include instanceid in the prefix, in case multiple instances use the same cache (e.g. same FPM pool) $instanceid = \OCP\Server::get(SystemConfig::class)->getValue('instanceid'); $this->globalPrefix = hash('xxh128', $instanceid . implode('.', $this->serverVersion->getVersion()));