mirror of
https://github.com/Universal-Omega/PortableInfobox.git
synced 2024-11-15 03:35:53 +00:00
DAT-3192 Invalidate memcache on allinfoboxes query update
This commit is contained in:
parent
f025c91d2d
commit
ce6f4e7646
|
@ -66,6 +66,7 @@ $wgHooks[ 'BeforePageDisplay' ][] = 'PortableInfoboxHooks::onBeforePageDisplay';
|
|||
$wgHooks[ 'ParserAfterTidy' ][] = 'PortableInfoboxParserTagController::replaceInfoboxMarkers';
|
||||
$wgHooks[ 'ImageServing::buildAndGetIndex' ][] = 'PortableInfoboxHooks::onImageServingCollectImages';
|
||||
$wgHooks[ 'wgQueryPages' ][] = 'PortableInfoboxHooks::onWgQueryPages';
|
||||
$wgHooks[ 'AllInfoboxesQueryRecached' ][] = 'PortableInfoboxHooks::onAllInfoboxesQueryRecached';
|
||||
|
||||
// special pages
|
||||
$wgSpecialPages[ 'AllInfoboxes' ] = 'AllinfoboxesQueryPage';
|
||||
|
|
|
@ -49,4 +49,9 @@ class PortableInfoboxHooks {
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
static public function onAllInfoboxesQueryRecached() {
|
||||
F::app()->wg->Memc->delete( wfMemcKey( ApiQueryAllinfoboxes::MCACHE_KEY ) );
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -73,6 +73,8 @@ class AllinfoboxesQueryPage extends PageQueryPage {
|
|||
$dbw->commit();
|
||||
}
|
||||
|
||||
wfRunHooks( 'AllInfoboxesQueryRecached' );
|
||||
|
||||
return $inserted;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue