예제 #1
0
 /**
  * Check if the page can be cached
  * @return bool
  */
 public function isFileCacheable()
 {
     $cacheable = false;
     if (HTMLFileCache::useFileCache($this->getContext())) {
         $cacheable = $this->mPage->getID() && !$this->mRedirectedFrom && !$this->getTitle()->isRedirect();
         // Extension may have reason to disable file caching on some pages.
         if ($cacheable) {
             $cacheable = wfRunHooks('IsFileCacheable', array(&$this));
         }
     }
     return $cacheable;
 }
예제 #2
0
 /**
  * @param WikiPage $article
  * @return mixed|string
  */
 protected function getOptionsKey($article)
 {
     $pageid = $article->getID();
     return wfMemcKey('pcache', 'idoptions', "{$pageid}");
 }
 /**
  * @param WikiPage $article
  * @param $user
  * @param $text
  * @param $summary
  * @param $minoredit
  * @param $watchthis
  * @param $sectionanchor
  * @param $flags
  * @param $revision
  * @param $status
  * @param $baseRevId
  * @param null $redirect
  * @return bool
  */
 public function onArticleSaveComplete(&$article, &$user, $text, $summary, $minoredit, $watchthis, $sectionanchor, &$flags, $revision, &$status, $baseRevId, &$redirect = null)
 {
     $this->purgeCache($article->getID());
     return true;
 }