mirror of
https://github.com/Universal-Omega/PortableInfobox.git
synced 2024-11-15 20:09:44 +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[ 'ParserAfterTidy' ][] = 'PortableInfoboxParserTagController::replaceInfoboxMarkers';
|
||||||
$wgHooks[ 'ImageServing::buildAndGetIndex' ][] = 'PortableInfoboxHooks::onImageServingCollectImages';
|
$wgHooks[ 'ImageServing::buildAndGetIndex' ][] = 'PortableInfoboxHooks::onImageServingCollectImages';
|
||||||
$wgHooks[ 'wgQueryPages' ][] = 'PortableInfoboxHooks::onWgQueryPages';
|
$wgHooks[ 'wgQueryPages' ][] = 'PortableInfoboxHooks::onWgQueryPages';
|
||||||
|
$wgHooks[ 'AllInfoboxesQueryRecached' ][] = 'PortableInfoboxHooks::onAllInfoboxesQueryRecached';
|
||||||
|
|
||||||
// special pages
|
// special pages
|
||||||
$wgSpecialPages[ 'AllInfoboxes' ] = 'AllinfoboxesQueryPage';
|
$wgSpecialPages[ 'AllInfoboxes' ] = 'AllinfoboxesQueryPage';
|
||||||
|
|
|
@ -49,4 +49,9 @@ class PortableInfoboxHooks {
|
||||||
|
|
||||||
return true;
|
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();
|
$dbw->commit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wfRunHooks( 'AllInfoboxesQueryRecached' );
|
||||||
|
|
||||||
return $inserted;
|
return $inserted;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue