purge file cache in invalidateCache
authorRiver Tarnell <kateturner@users.mediawiki.org>
Sun, 17 Jul 2005 19:34:58 +0000 (19:34 +0000)
committerRiver Tarnell <kateturner@users.mediawiki.org>
Sun, 17 Jul 2005 19:34:58 +0000 (19:34 +0000)
includes/Title.php

index b94b33a..ce8847b 100644 (file)
@@ -1170,6 +1170,8 @@ class Title {
         * @access public
         */
        function invalidateCache() {
+               global $wgUseFileCache;
+
                if ( wfReadOnly() ) {
                        return;
                }
@@ -1184,6 +1186,12 @@ class Title {
                                'page_title' => $this->getDBkey()
                        ), 'Title::invalidateCache'
                );
+
+               if ($wgUseFileCache) {
+                       $cache = new CacheManager($this);
+                       @unlink($cache->fileCacheName());
+               }
+
                return $success;
        }