mediawiki: do not clear session cache on every start

This commit is contained in:
Sandro Jäckel
2026-05-28 01:15:11 +02:00
parent 3bbdb3d208
commit 15d83e044f
2 changed files with 19 additions and 0 deletions
@@ -0,0 +1,13 @@
diff --git a/includes/Installer/DatabaseUpdater.php b/includes/Installer/DatabaseUpdater.php
index 8ed996b9dee..733a3210096 100644
--- a/includes/Installer/DatabaseUpdater.php
+++ b/includes/Installer/DatabaseUpdater.php
@@ -1380,7 +1380,7 @@ public function purgeCache() {
// ObjectCache
$this->db->newDeleteQueryBuilder()
->deleteFrom( 'objectcache' )
- ->where( ISQLPlatform::ALL_ROWS )
+ ->where( "keyname NOT LIKE '%:MWSession:%'" )
->caller( __METHOD__ )
->execute();
+6
View File
@@ -14,6 +14,12 @@ stdenvNoCC.mkDerivation rec {
hash = "sha256-XqjB8yHJ+Nuk0aweTsoYJ/sTUZ1KIZDiOfUUMgWKQmk=";
};
patches = [
# NixOS runs the update script on every start as we might need to run some migrations.
# Normally this clears all active sessions, for usability we do not do that.
./keep-session-object-cache.diff
];
postPatch = ''
substituteInPlace includes/installer/CliInstaller.php \
--replace-fail '$vars = Installer::getExistingLocalSettings();' '$vars = null;'