Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(Memcache): use different cache key when in maintenance mode
Signed-off-by: Ferdinand Thiessen <[email protected]>
  • Loading branch information
susnux authored and AndyScherzinger committed Dec 3, 2025
commit 2cc0420cce523ac8661d94759b7c5bac5840a537
6 changes: 5 additions & 1 deletion lib/private/Memcache/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,16 @@ public function __construct(
protected function getGlobalPrefix(): string {
if ($this->globalPrefix === null) {
$config = \OCP\Server::get(SystemConfig::class);
$maintenanceMode = $config->getValue('maintenance', false);
$versions = [];
if ($config->getValue('installed', false)) {
if ($config->getValue('installed', false) && !$maintenanceMode) {
$appConfig = \OCP\Server::get(IAppConfig::class);
// only get the enabled apps to clear the cache in case an app is enabled or disabled (e.g. clear routes)
$versions = $appConfig->getAppInstalledVersions(true);
ksort($versions);
} else {
// if not installed or in maintenance mode, we should distinguish between both states.
$versions['core:maintenance'] = $maintenanceMode ? '1' : '0';
}
$versions['core'] = implode('.', $this->serverVersion->getVersion());

Expand Down
Loading