X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=maintenance%2FpurgeParserCache.php;h=da2d850e157d617f9161c5c5580e553e01058412;hp=e00a55d29ec18416687a4e2800b1bd03d5ce6f0a;hb=2480aae0c97d822e10b50619e7b48b25c45af073;hpb=b8da5c83743ea31c6f73c063508384f114748537 diff --git a/maintenance/purgeParserCache.php b/maintenance/purgeParserCache.php index e00a55d29e..da2d850e15 100644 --- a/maintenance/purgeParserCache.php +++ b/maintenance/purgeParserCache.php @@ -24,6 +24,8 @@ require __DIR__ . '/Maintenance.php'; +use MediaWiki\MediaWikiServices; + /** * Maintenance script to remove old objects from the parser cache. * @@ -67,7 +69,7 @@ class PurgeParserCache extends Maintenance { $this->output( "Deleting objects expiring before " . $english->timeanddate( $date ) . "\n" ); - $pc = wfGetParserCacheStorage(); + $pc = MediaWikiServices::getInstance()->getParserCache()->getCacheStorage(); $success = $pc->deleteObjectsExpiringBefore( $date, [ $this, 'showProgressAndWait' ] ); if ( !$success ) { $this->error( "\nCannot purge this kind of parser cache.", 1 );