Index: trunk/phase3/includes/actions/CachedAction.php |
— | — | @@ -37,6 +37,14 @@ |
38 | 38 | protected $cacheHelper; |
39 | 39 | |
40 | 40 | /** |
| 41 | + * If the cache is enabled or not. |
| 42 | + * |
| 43 | + * @since 1.20 |
| 44 | + * @var boolean |
| 45 | + */ |
| 46 | + protected $cacheEnabled = true; |
| 47 | + |
| 48 | + /** |
41 | 49 | * Sets if the cache should be enabled or not. |
42 | 50 | * |
43 | 51 | * @since 1.20 |
— | — | @@ -56,8 +64,9 @@ |
57 | 65 | * @param boolean|null $cacheEnabled Sets if the cache should be enabled or not. |
58 | 66 | */ |
59 | 67 | public function startCache( $cacheExpiry = null, $cacheEnabled = null ) { |
60 | | - $this->cacheHelper = new CacheHelper( $this->get ); |
| 68 | + $this->cacheHelper = new CacheHelper(); |
61 | 69 | |
| 70 | + $this->cacheHelper->setCacheEnabled( $this->cacheEnabled ); |
62 | 71 | $this->cacheHelper->setOnInitializedHandler( array( $this, 'onCacheInitialized' ) ); |
63 | 72 | |
64 | 73 | $keyArgs = $this->getCacheKey(); |
Index: trunk/phase3/includes/specials/SpecialCachedPage.php |
— | — | @@ -37,6 +37,14 @@ |
38 | 38 | protected $cacheHelper; |
39 | 39 | |
40 | 40 | /** |
| 41 | + * If the cache is enabled or not. |
| 42 | + * |
| 43 | + * @since 1.20 |
| 44 | + * @var boolean |
| 45 | + */ |
| 46 | + protected $cacheEnabled = true; |
| 47 | + |
| 48 | + /** |
41 | 49 | * Sets if the cache should be enabled or not. |
42 | 50 | * |
43 | 51 | * @since 1.20 |
— | — | @@ -56,8 +64,9 @@ |
57 | 65 | * @param boolean|null $cacheEnabled Sets if the cache should be enabled or not. |
58 | 66 | */ |
59 | 67 | public function startCache( $cacheExpiry = null, $cacheEnabled = null ) { |
60 | | - $this->cacheHelper = new CacheHelper( $this->get ); |
| 68 | + $this->cacheHelper = new CacheHelper(); |
61 | 69 | |
| 70 | + $this->cacheHelper->setCacheEnabled( $this->cacheEnabled ); |
62 | 71 | $this->cacheHelper->setOnInitializedHandler( array( $this, 'onCacheInitialized' ) ); |
63 | 72 | |
64 | 73 | $keyArgs = $this->getCacheKey(); |