Manual talk:$wgRCMaxAge

Jump to navigation Jump to search

Is this setting realy maintained?

In my little (low traffic) wikis, Iwould loe to keep the change history for a year or forever. However, when I change the setting to e.g.

$wgRCMaxAge = 31536000;


$wgRCMaxAge = 9536000;

I do not see any changes in the "Recent Changes" page.

I don't really know much about the inner workings of recent changes, but my understanding is that it is generated from a dedicated table, and that $wgRCMaxAge tells MW how long to keep the data in that table. If that is true, then increasing this value won't have any immediate effect, but you should find that the list gets longer as the days go by, until ultimately the length of the list reflects the value set here. --HappyDog 00:57, 6 November 2007 (UTC)
Is there a way to add data to the table from before this variable was changed? 17:00, 23 November 2007 (UTC)

This setting is to be done where?[edit]

I think this setting has to be done in the LocalSettings.php ??

  • Mention this in the Manual
  • screen an example

Thank you. --FSLEP !? @ 07:17, 12 January 2009 (UTC)

Yes, it is in LocalSettings.php. --Robinson Weijman 14:46, 4 August 2010 (UTC)

Default value[edit]

As there are given on those recentchanges pages by default values of 14 and 30 days to be shown, I think the default value of this setting should be adjusted to a 30 day max, or the default values of 14 and 30 days given on recentchanges pages should be omitted by default. It's just confusing when those values don't change the page's content because another default setting blocks it by default. Regards -- JörgM 07:59, 28 April 2009 (UTC)

Now defaults to 7 days...[edit]

With MediaWiki 1.15.1, I'm seeing this default to 7 days instead of 91 days as displayed when running maintenance/rebuildrecentchanges.php. I've set the value back to 91 days in the LocalSettings.php and that resolves the issue.

I can confirm this. -Pinkgothic 12:01, 30 November 2009 (UTC)
As per this edit: Guess it's not a change after all. :) -Pinkgothic 13:20, 30 November 2009 (UTC)

Watch list?[edit]

I made this change and indeed the Recent Changes option under MY PREFERENCES shows maximum 91 days. But under the watch list it still shows 7 days. I thought this number changed both? --Robinson Weijman 14:48, 4 August 2010 (UTC)

This variable affects the maximum number of days that recent changes are retained. It does not affect the default. There's a separate option for that, I believe, but I can't remember its name. Reach Out to the Truth 15:22, 4 August 2010 (UTC)
Thanks for the reply but it doesn't affect the maximum for the watch list - that was my point. Maximum still stays on 7 days. --Robinson Weijman 09:45, 5 August 2010 (UTC)
Confirmed. With 1.16.2 resetting this in LocalSettings.php, and running maintenance/rebuildrecentchanges.php - which confirms the new value - doesn't change the watchlist maximum offered users, which stays at 7 days. There's nothing in the man page of LocalSettings variables that obviously refers to watchlist duration. --Whit 14:58, 7 April 2011 (UTC)

Disable purging[edit]

So, one could effectively disable purging by setting a really high value, right? E.g.:

$wgRCMaxAge = 86400 * 365.242 * 1000000; // 1,000,000 years (365.242 comes from googling "days per year")

Leucosticte (talk) 15:47, 10 August 2012 (UTC)

Caution! That million-year value can cause an internal error when the "Page information" link in the sidebar is pressed. This line in includes/actions/InfoAction.php triggers it by passing a very large negative value to the timestamp function:

    $threshold = $dbr->timestamp( time() - $config->get( 'RCMaxAge' ) );

Using 100 or 1000 instead of 1000000 appears to prevent that problem.

Maybe better:

$wgRCMaxAge = time(); // no larger, since negative values (for before 1970) may be problematic and the wiki's not that old
// Round down to a whole number of days to avoid fraction in Watchlist "Period of time to display".
$wgRCMaxAge -= ($wgRCMaxAge % 86400);

ThomasEugeneBishop (talk) 21:29, 9 January 2018 (UTC)