Manual talk:RebuildFileCache.php

From mediawiki.org
Latest comment: 1 year ago by 195.192.205.169 in topic Problem with --end

still incorrectly creating files for redirects?[edit]

I am using mediawiki 1.16.0, and the RebuildFileCache creates cache files for redirects. On Release_notes/1.17, it is said 'rebuildFileCache.php no longer creates inappropriate cache files for redirects.', but I didn't see any code change to do the job. Even the script coming with 1.19.1 has no code to test if a page make redirect. Does new script still is making the mistake or it fixes the problem someway?

ps: below is how I modified the code of 1.16.0 to avoid create cache files for redirects.

...
				// If the article is cacheable, then load it
				if ( $wgArticle->isFileCacheable() ) {
					// skip redirects
					if ( $wgArticle->isRedirect() ) {
						$this->output( "skip {$row->page_id}: {$row->page_title}, redirect\n" );
						continue;
					}
					$cache = new HTMLFileCache( $wgTitle );
...

--Superxain (talk) 11:41, 18 August 2012 (UTC)Reply

Problem with --end[edit]

I have a problem with --end:

rebuildFileCache.php --start=3000 --end=3030

Excepted: The Script starts with ID 3000 an ends with ID 3030

Result: The Script starts with ID 3000 an ends with ID 3098

Why does the script not stop at ID=3030 and how to fix this problem? 37.251.228.46 13:45, 20 March 2022 (UTC)Reply

Solution: Edit rebuildFileCache.php and change "batch-size" to 1.

--195.192.205.169 21:20, 3 July 2022 (UTC)Reply

Same problem[edit]

I have these same problems. When I set --start and --end to the same value to recache a single page, it just continues caching subsequent pages one at a time. I need to recache around 130,000 pages one at a time from a list of pageIDs. It's infuriating. --Polymath_uk

The my anwser. --195.192.205.169