Make action=purge on file redirects purge the file redirect cache.
authorBrian Wolff <bawolff+wn@gmail.com>
Sun, 4 Aug 2013 03:36:38 +0000 (00:36 -0300)
committerBrian Wolff <bawolff+wn@gmail.com>
Sun, 4 Aug 2013 03:36:38 +0000 (00:36 -0300)
Seems like something that should get purged. Inspired specificly
by bug 52200 (Not intended to be a solution to that bug, that bug
just illustrated that this cache is not purged on action=purge).

Change-Id: Ib70eef800f686a96a261ee38de5df239847ace8a

includes/WikiFilePage.php

index 5e603d3..fe1ff88 100644 (file)
@@ -183,6 +183,10 @@ class WikiFilePage extends WikiPage {
                        // to be updated (in case the cached information is wrong)
                        $this->mFile->purgeCache( array( 'forThumbRefresh' => true ) );
                }
+               if ( $this->mRepo ) {
+                       // Purge redirect cache
+                       $this->mRepo->invalidateImageRedirect( $this->mTitle );
+               }
                return parent::doPurge();
        }
 }