/**
  * Our hook which is processed whenever a Category Page is viewed.  When 
  * this happens, we hijack the normal mediawiki flow and create an instance 
  * of our CategoryViewer(PonyDocsCategoryPageHandler) which has a special 
  * addPage method which adds the H1 of the article content, instead of the 
  * title itself.
  *
  * @param CategoryArticle $categoryArticle a reference to the 
  * CategoryArticle which fired off the event.
  * @return boolean We return false to make mediawiki stop processing the 
  * normal flow.
  */
 static function onCategoryPageView(&$categoryArticle)
 {
     global $wgOut, $wgRequest;
     $from = $wgRequest->getVal('from');
     $until = $wgRequest->getVal('until');
     $cacheKey = "category-" . $categoryArticle->getTitle() . "-{$from}-{$until}";
     $res = null;
     $cache = PonyDocsCache::getInstance();
     // See if this exists in our cache
     $res = $cache->get($cacheKey);
     if ($res == null) {
         // Either cache is disabled, or cached entry does not exist
         $categoryViewer = new PonyDocsCategoryPageHandler($categoryArticle->getTitle(), $from, $until);
         $res = $categoryViewer->getHTML();
         // Store in our cache
         $cache->put($cacheKey, $res, CATEGORY_CACHE_TTL);
     }
     $wgOut->addHTML($res);
     return false;
     // We don't want to continue processing the "normal" mediawiki path, so return false here.
 }