Template:Purge/sandbox

From OpenStreetMap Wiki
Jump to navigation Jump to search

Purge

[Edit] [Purge] Template-info.svg Template documentation

Inserts a link that rebuilds the current page without using the cache. The link is displayed in the user's interface language, regardless of the page's content language. This link appears at the top of {{Languages}} and {{Documentation}}, which together appear on virtually every page of the wiki.

Usage

{{purge}}

Parameters:

|page =
(Optional) The page that is purged when clicking the inserted link. If this parameter is omitted, the default value is the current page.

The |lang = parameter is no longer supported. The link is always displayed in the user's interface language.

Examples

  • {{purge/sandbox}}Purge
    Purges the current page.
  • {{purge/sandbox|page=Main Page}}Purge
    Purges the specified page.

Rationale

For efficiency in service, MediaWiki caches pages. Depending on the exact sequence of actions editors follow, one may view an out-of-date version of a given page. This happens most often on heavily-edited pages and on pages which contain an transcluded templates.

{{Purge}} adds to any page a link that, when clicked, not only reloads the page, but clears the server cache, forcing the page to be completely rendered "from scratch". This is not a one-time solution; generally, editing a page is itself sufficient to purge cache. Rather, it is a measure taken in anticipation of the frequent need to purge.

Technical details

This template uses 2 MediaWiki messages:

Inserts a link that rebuilds the current page without using the cache. The link is displayed in the user's interface language, regardless of the page's content language.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Page titlepage

The page that is purged when clicking the inserted link. If this parameter is omitted, the default value is the current page.

Example
Main Page
Page nameoptional