wiki.techinc.nl/maintenance/purgeMessageBlobStore.php
Derick Alangi 74033c50cd maintenance: Begin using Maintenance::getServiceContainer()
Maintenance class provides a method for getting a fresh reference
of the MW services container instance. Let's make use of these in
maintenance scripts now that we have it.

NOTE: There are still some static methods like in refreshLinks.php
that makes use of services that we can't use this method for now.

Change-Id: Idba744057577896fc97c9ecf4724db27542bf01c
2023-09-04 10:39:58 +00:00

21 lines
501 B
PHP

<?php
require_once __DIR__ . '/Maintenance.php';
/**
* Purge the MessageBlobStore cache.
*
* This script exists for use with the `--skip-message-purge` option of
* rebuildLocalisationCache.php.
*
* @since 1.36
*/
class PurgeMessageBlobStore extends Maintenance {
public function execute() {
$blobStore = $this->getServiceContainer()->getResourceLoader()->getMessageBlobStore();
$blobStore->clear();
}
}
$maintClass = PurgeMessageBlobStore::class;
require_once RUN_MAINTENANCE_IF_MAIN;