r114172 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r114171‎ | r114172 | r114173 >
Date:19:24, 19 March 2012
Author:jeroendedauw
Status:reverted
Tags:gerritmigration 
Comment:
update docs
Modified paths:
  • /trunk/phase3/includes/specials/SpecialCachedPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialCachedPage.php
@@ -3,12 +3,13 @@
44 /**
55 * Abstract special page class with scaffolding for caching the HTML output.
66 *
7 - * To enable the caching functionality, the cacheExpiry field should be set
8 - * before parent::execute is called (and it should be called from execute).
9 - *
107 * To add HTML that should be cached, use addCachedHTML like this:
11 - * $this->addCachedHTML( array( $this, 'displayCachedContent' ) );
 8+ * $this->addCachedHTML( $callback );
129 *
 10+ * The callback function is only called when needed, so do all your expensive
 11+ * computations here. This function should returns the HTML to be cached.
 12+ * It should not add anything to the PageOutput object!
 13+ *
1314 * Before the first addCachedHTML call, you should call $this->startCache();
1415 * After adding the last HTML that should be cached, call $this->saveCache();
1516 *
@@ -144,6 +145,11 @@
145146 }
146147 }
147148
 149+ /**
 150+ * Gets called after the cache got initialized.
 151+ *
 152+ * @since 1.20
 153+ */
148154 protected function onCacheInitialized() {
149155 if ( $this->hasCached ) {
150156 $this->getOutput()->setSubtitle( $this->getCachedNotice() );

Follow-up revisions

RevisionCommit summaryAuthorDate
r114326Revert r114067, r114071, r114075, r114079, r114081, r114082, r114084, r114086......catrope23:03, 20 March 2012

Status & tagging log