Index: trunk/phase3/includes/specials/SpecialCachedPage.php |
— | — | @@ -78,19 +78,21 @@ |
79 | 79 | * @param boolean|null $cacheEnabled Sets if the cache should be enabled or not. |
80 | 80 | */ |
81 | 81 | public function startCache( $cacheExpiry = null, $cacheEnabled = null ) { |
82 | | - if ( !is_null( $cacheExpiry ) ) { |
83 | | - $this->cacheExpiry = $cacheExpiry; |
84 | | - } |
| 82 | + if ( is_null( $this->hasCached ) ) { |
| 83 | + if ( !is_null( $cacheExpiry ) ) { |
| 84 | + $this->cacheExpiry = $cacheExpiry; |
| 85 | + } |
85 | 86 | |
86 | | - if ( !is_null( $cacheEnabled ) ) { |
87 | | - $this->setCacheEnabled( $cacheEnabled ); |
88 | | - } |
| 87 | + if ( !is_null( $cacheEnabled ) ) { |
| 88 | + $this->setCacheEnabled( $cacheEnabled ); |
| 89 | + } |
89 | 90 | |
90 | | - if ( $this->getRequest()->getText( 'action' ) === 'purge' ) { |
91 | | - $this->hasCached = false; |
| 91 | + if ( $this->getRequest()->getText( 'action' ) === 'purge' ) { |
| 92 | + $this->hasCached = false; |
| 93 | + } |
| 94 | + |
| 95 | + $this->initCaching(); |
92 | 96 | } |
93 | | - |
94 | | - $this->initCaching(); |
95 | 97 | } |
96 | 98 | |
97 | 99 | /** |