I have a page Alpha, which contains a "Category: X" link, but the
"Category:
X" page does not have the page Alpha listed on it. When I edit the page
Alpha then the "Category: X" page correctly lists the Alpha page. My
question: how can I force, with MediaWiki calls, an update of the category
links. I have tried with the following code to even check if the category
links are OK, but this does not seem to work. Thanks for any ideas.
$pageName = "Alpha";
$title = new Title();
$title = $title->newFromText($pageName);
$linkCache = new LinkCache();
$linkCache->preFill($title);
$catLinks = $linkCache->getCategoryLinks();
print_r($catLinks, "catLinks");