Revert "mediawiki: do not clear session cache on every start"

This commit is contained in:
Martin Weinelt 2026-05-30 20:07:40 +02:00 committed by GitHub
commit 5af0c6d30d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 0 additions and 19 deletions

View file

@ -1,13 +0,0 @@
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();

View file

@ -14,12 +14,6 @@ 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;'