mediawiki: do not clear session cache on every start (#507422)
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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;'
|
||||
|
||||
Reference in New Issue
Block a user