Index: trunk/phase3/docs/hooks.txt |
— | — | @@ -238,6 +238,9 @@ |
239 | 239 | $autoblockip: The IP going to be autoblocked. |
240 | 240 | $block: The block from which the autoblock is coming. |
241 | 241 | |
| 242 | +'AbortDiffCache': Can be used to cancel the caching of a diff |
| 243 | +&$diffEngine: DifferenceEngine object |
| 244 | + |
242 | 245 | 'AbortLogin': Return false to cancel account login. |
243 | 246 | $user: the User object being authenticated against |
244 | 247 | $password: the password being submitted, not yet checked for validity |
Index: trunk/phase3/includes/diff/DifferenceEngine.php |
— | — | @@ -546,7 +546,9 @@ |
547 | 547 | $difftext = $this->generateDiffBody( $this->mOldtext, $this->mNewtext ); |
548 | 548 | |
549 | 549 | // Save to cache for 7 days |
550 | | - if ( $key !== false && $difftext !== false ) { |
| 550 | + if ( !wfRunHooks( 'AbortDiffCache', array( &$this ) ) ) { |
| 551 | + wfIncrStats( 'diff_uncacheable' ); |
| 552 | + } else if ( $key !== false && $difftext !== false ) { |
551 | 553 | wfIncrStats( 'diff_cache_miss' ); |
552 | 554 | $wgMemc->set( $key, $difftext, 7*86400 ); |
553 | 555 | } else { |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -196,6 +196,7 @@ |
197 | 197 | * Added the BitmapHandler_ClientOnly media handler, which allows server-side |
198 | 198 | image scaling to be completely disabled for specific media types, via the |
199 | 199 | $wgMediaHandlers configuration variable. |
| 200 | +* New 'AbortDiffCache' hook can be used to cancel the caching of a diff |
200 | 201 | |
201 | 202 | === Bug fixes in 1.14 === |
202 | 203 | |