API:Purge

From MediaWiki.org
Jump to: navigation, search
Tools clipart.png This page is part of the MediaWiki API documentation.
Language: English  • Deutsch • 日本語 • polski
MediaWiki API

Quick overview:

v · d · e
MediaWiki version: 1.14

Purging pages' caches[edit | edit source]

You can purge the cache of one or more pages using action=purge.

Parameters[edit | edit source]

  • titles/pageids/revids: A list of titles/page IDs/revision IDs
  • forcelinkupdate: If set, updates the link tables
  • forcerecursivelinkupdate: Like forcelinkupdate, but also do forcelinkupdate on any page that transcludes the current page. This is akin to making an edit to a template. Note that the job queue is used for this operation, so there may be a slight delay when doing this for pages used a large number of times.
  • generator: Use a generator to get the list of pages to purge

Examples[edit | edit source]

  1. Purge file with inconsistent external links table on commons: https://commons.wikimedia.org/w/api.php?action=purge&titles=File:Masopust_držíme_18.jpg&forcelinkupdate
  2. Purging the cache of Main Page, Nonexistent and Talk:

Possible errors[edit | edit source]

Code Info
cantpurge Only users with the 'purge' right can purge pages via the API