/**
  * Hook entry for Category Service to invalidate the cache
  * Removes entries from memcached
  */
 public static function onCategoryServiceInvalidateTopArticles($title, $ns)
 {
     if ($ns == NS_MAIN) {
         $categoryPage = Article::newFromTitle($title, RequestContext::getMain());
         $gallery = new CategoryGallery($categoryPage);
         $gallery->invalidate();
     }
     return true;
 }
Ejemplo n.º 2
0
 /**
  * Returns the static model of the specified AR class.
  * @param string $className active record class name.
  * @return ACategoryGallery the static model class
  */
 public static function model($className = __CLASS__)
 {
     return parent::model($className);
 }