X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FpurgeParserCache.php;h=da2d850e157d617f9161c5c5580e553e01058412;hb=f600b4ede9a6390cc5e929d2a48ed98af2edbc60;hp=e00a55d29ec18416687a4e2800b1bd03d5ce6f0a;hpb=44a9c1bf59b110e3d04b6a5083242f981f4de832;p=lhc%2Fweb%2Fwiklou.git 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 );