Index: trunk/extensions/Translate/tag/SpecialPageTranslation.php |
— | — | @@ -509,9 +509,9 @@ |
510 | 510 | $this->setupRenderJobs( $page ); |
511 | 511 | |
512 | 512 | // Re-generate caches |
| 513 | + $page->getTranslationPercentages( /*re-generate*/ true ); |
| 514 | + ArrayMemoryCache::factory( 'groupstats' )->clearGroup( 'page|' . $page->getTitle()->getPrefixedText() ); |
513 | 515 | MessageIndexRebuilder::execute(); |
514 | | - $page->getTranslationPercentages( /*re-generate*/ true ); |
515 | | - |
516 | 516 | return false; |
517 | 517 | } |
518 | 518 | |
Index: trunk/extensions/Translate/utils/MemoryCache.php |
— | — | @@ -19,6 +19,11 @@ |
20 | 20 | $this->save(); |
21 | 21 | } |
22 | 22 | |
| 23 | + public function factory( $table ) { |
| 24 | + // __CLASS__ doesn't work, but this is PHP |
| 25 | + return new ArrayMemoryCache( $table ); |
| 26 | + } |
| 27 | + |
23 | 28 | public function get( $group, $code ) { |
24 | 29 | $this->load(); |
25 | 30 | |
— | — | @@ -51,6 +56,11 @@ |
52 | 57 | } |
53 | 58 | } |
54 | 59 | |
| 60 | + public function clearGroup( $group ) { |
| 61 | + $this->load(); |
| 62 | + unset( $this->cache[$group] ); |
| 63 | + } |
| 64 | + |
55 | 65 | public function clearAll() { |
56 | 66 | $this->load(); |
57 | 67 | $this->cache = array(); |