mirror of
https://github.com/Universal-Omega/PortableInfobox.git
synced 2024-11-15 11:59:56 +00:00
Merge pull request #8383 from Wikia/DAT-3192
DAT-3192 Invalidate memcache on allinfoboxes query update
This commit is contained in:
commit
a3b3cce449
|
@ -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