當前位置: 首頁>>代碼示例>>PHP>>正文


PHP DeferredUpdates::addHTMLCacheUpdate方法代碼示例

本文整理匯總了PHP中DeferredUpdates::addHTMLCacheUpdate方法的典型用法代碼示例。如果您正苦於以下問題:PHP DeferredUpdates::addHTMLCacheUpdate方法的具體用法?PHP DeferredUpdates::addHTMLCacheUpdate怎麽用?PHP DeferredUpdates::addHTMLCacheUpdate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在DeferredUpdates的用法示例。


在下文中一共展示了DeferredUpdates::addHTMLCacheUpdate方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: HTMLCacheUpdates

 /**
  * Do cache updates for when the stable version of a page changed.
  * Invalidates/purges pages that include the given page.
  * @param Title $title
  */
 public static function HTMLCacheUpdates(Title $title)
 {
     # Invalidate caches of articles which include this page...
     DeferredUpdates::addHTMLCacheUpdate($title, 'templatelinks');
     if ($title->getNamespace() == NS_FILE) {
         DeferredUpdates::addHTMLCacheUpdate($title, 'imagelinks');
     }
     DeferredUpdates::addUpdate(new FRExtraCacheUpdate($title));
 }
開發者ID:crippsy14,項目名稱:orange-smorange,代碼行數:14,代碼來源:FlaggedRevs.class.php

示例2: onArticleEdit

	/**
	 * Purge caches on page update etc
	 *
	 * @param $title Title object
	 * @todo Verify that $title is always a Title object (and never false or null), add Title hint to parameter $title
	 */
	public static function onArticleEdit( $title ) {
		// Invalidate caches of articles which include this page
		DeferredUpdates::addHTMLCacheUpdate( $title, 'templatelinks' );

		// Invalidate the caches of all pages which redirect here
		DeferredUpdates::addHTMLCacheUpdate( $title, 'redirect' );

		// Purge squid for this page only
		$title->purgeSquid();

		// Clear file cache for this page only
		HTMLFileCache::clearFileCache( $title );
		InfoAction::invalidateCache( $title );
	}
開發者ID:nahoj,項目名稱:mediawiki_ynh,代碼行數:20,代碼來源:WikiPage.php

示例3: onArticleEdit

 /**
  * Purge caches on page update etc
  *
  * @param Title $title
  * @param Revision|null $revision Revision that was just saved, may be null
  */
 public static function onArticleEdit(Title $title, Revision $revision = null)
 {
     // Invalidate caches of articles which include this page
     DeferredUpdates::addHTMLCacheUpdate($title, 'templatelinks');
     // Invalidate the caches of all pages which redirect here
     DeferredUpdates::addHTMLCacheUpdate($title, 'redirect');
     // Purge squid for this page only
     $title->purgeSquid();
     // Clear file cache for this page only
     HTMLFileCache::clearFileCache($title);
     $revid = $revision ? $revision->getId() : null;
     DeferredUpdates::addCallableUpdate(function () use($title, $revid) {
         InfoAction::invalidateCache($title, $revid);
     });
 }
開發者ID:ucfengzhun,項目名稱:mediawiki,代碼行數:21,代碼來源:WikiPage.php


注:本文中的DeferredUpdates::addHTMLCacheUpdate方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。