r114226 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r114225‎ | r114226 | r114227 >
Date:00:31, 20 March 2012
Author:jeroendedauw
Status:reverted
Tags:gerritmigration 
Comment:
added enabled field so you can disable the cache thing if you need to before its been initialized and fixed copypaste error
Modified paths:
  • /trunk/phase3/includes/actions/CachedAction.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialCachedPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/actions/CachedAction.php
@@ -37,6 +37,14 @@
3838 protected $cacheHelper;
3939
4040 /**
 41+ * If the cache is enabled or not.
 42+ *
 43+ * @since 1.20
 44+ * @var boolean
 45+ */
 46+ protected $cacheEnabled = true;
 47+
 48+ /**
4149 * Sets if the cache should be enabled or not.
4250 *
4351 * @since 1.20
@@ -56,8 +64,9 @@
5765 * @param boolean|null $cacheEnabled Sets if the cache should be enabled or not.
5866 */
5967 public function startCache( $cacheExpiry = null, $cacheEnabled = null ) {
60 - $this->cacheHelper = new CacheHelper( $this->get );
 68+ $this->cacheHelper = new CacheHelper();
6169
 70+ $this->cacheHelper->setCacheEnabled( $this->cacheEnabled );
6271 $this->cacheHelper->setOnInitializedHandler( array( $this, 'onCacheInitialized' ) );
6372
6473 $keyArgs = $this->getCacheKey();
Index: trunk/phase3/includes/specials/SpecialCachedPage.php
@@ -37,6 +37,14 @@
3838 protected $cacheHelper;
3939
4040 /**
 41+ * If the cache is enabled or not.
 42+ *
 43+ * @since 1.20
 44+ * @var boolean
 45+ */
 46+ protected $cacheEnabled = true;
 47+
 48+ /**
4149 * Sets if the cache should be enabled or not.
4250 *
4351 * @since 1.20
@@ -56,8 +64,9 @@
5765 * @param boolean|null $cacheEnabled Sets if the cache should be enabled or not.
5866 */
5967 public function startCache( $cacheExpiry = null, $cacheEnabled = null ) {
60 - $this->cacheHelper = new CacheHelper( $this->get );
 68+ $this->cacheHelper = new CacheHelper();
6169
 70+ $this->cacheHelper->setCacheEnabled( $this->cacheEnabled );
6271 $this->cacheHelper->setOnInitializedHandler( array( $this, 'onCacheInitialized' ) );
6372
6473 $keyArgs = $this->getCacheKey();

Follow-up revisions

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

Status & tagging log