Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| PurgeMessageBlobStore | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
| execute | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | use MediaWiki\Maintenance\Maintenance; |
| 4 | use MediaWiki\ResourceLoader\MessageBlobStore; |
| 5 | |
| 6 | // @codeCoverageIgnoreStart |
| 7 | require_once __DIR__ . '/Maintenance.php'; |
| 8 | // @codeCoverageIgnoreEnd |
| 9 | |
| 10 | /** |
| 11 | * Purge the MessageBlobStore cache. |
| 12 | * |
| 13 | * This script exists for use with the `--skip-message-purge` option of |
| 14 | * rebuildLocalisationCache.php. |
| 15 | * |
| 16 | * @ingroup ResourceLoader |
| 17 | * @since 1.36 |
| 18 | */ |
| 19 | class PurgeMessageBlobStore extends Maintenance { |
| 20 | public function execute() { |
| 21 | // T379722: This script uses the MessageBlobStore static method for the |
| 22 | // cache clearance to avoid depending on the Database via ResourceLoader |
| 23 | // service wiring when obtaining MessageBlobStore object. |
| 24 | $cache = $this->getServiceContainer()->getMainWANObjectCache(); |
| 25 | MessageBlobStore::clearGlobalCacheEntry( $cache ); |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | // @codeCoverageIgnoreStart |
| 30 | $maintClass = PurgeMessageBlobStore::class; |
| 31 | require_once RUN_MAINTENANCE_IF_MAIN; |
| 32 | // @codeCoverageIgnoreEnd |