/** * Override handling of action=purge */ public function doPurge() { $this->loadFile(); if ($this->mFile->exists()) { wfDebug('ImagePage::doPurge purging ' . $this->mFile->getName() . "\n"); $update = new HTMLCacheUpdate($this->mTitle, 'imagelinks'); $update->doUpdate(); $this->mFile->upgradeRow(); $this->mFile->purgeCache(array('forThumbRefresh' => true)); } else { wfDebug('ImagePage::doPurge no image for ' . $this->mFile->getName() . "; limiting purge to cache only\n"); // even if the file supposedly doesn't exist, force any cached information // to be updated (in case the cached information is wrong) $this->mFile->purgeCache(array('forThumbRefresh' => true)); } return parent::doPurge(); }
/** * Override handling of action=purge * @return bool */ public function doPurge() { $this->loadFile(); if ($this->mFile->exists()) { wfDebug('ImagePage::doPurge purging ' . $this->mFile->getName() . "\n"); DeferredUpdates::addUpdate(new HTMLCacheUpdate($this->mTitle, 'imagelinks')); $this->mFile->purgeCache(['forThumbRefresh' => true]); } else { wfDebug('ImagePage::doPurge no image for ' . $this->mFile->getName() . "; limiting purge to cache only\n"); // even if the file supposedly doesn't exist, force any cached information // to be updated (in case the cached information is wrong) $this->mFile->purgeCache(['forThumbRefresh' => true]); } if ($this->mRepo) { // Purge redirect cache $this->mRepo->invalidateImageRedirect($this->mTitle); } return parent::doPurge(); }
/** * Override handling of action=purge */ public function doPurge() { global $wgCityId; $this->loadFile(); if ($this->mFile->exists()) { wfDebug('ImagePage::doPurge purging ' . $this->mFile->getName() . "\n"); // Wikia Change Start @author Scott Rabin (srabin@wikia-inc.com) $task = (new \Wikia\Tasks\Tasks\HTMLCacheUpdateTask())->wikiId($wgCityId)->title($this->mTitle); $task->call('purge', 'imagelinks'); $task->queue(); // Wikia Change End $this->mFile->upgradeRow(); $this->mFile->purgeCache(array('forThumbRefresh' => true)); } else { wfDebug('ImagePage::doPurge no image for ' . $this->mFile->getName() . "; limiting purge to cache only\n"); // even if the file supposedly doesn't exist, force any cached information // to be updated (in case the cached information is wrong) $this->mFile->purgeCache(array('forThumbRefresh' => true)); } return parent::doPurge(); }