Community Central
Community Central
No edit summary
Tag: sourceedit
m (→‎How to purge: # doesn't have to be removed)
Tag: Help
(14 intermediate revisions by 12 users not shown)
Line 1: Line 1:
 
{{tocright}}The '''purge''' function is a handy way to clear a page's server [[Help:Bypass your cache|cache]]. This forces the wiki software to rebuild the page completely.
{{tocright}}
 
The '''purge''' function is a handy way to clear a page's server [[Help:Bypass your cache|cache]]. This forces the wiki software to rebuild the page completely.
 
   
 
For example, some pages often use [[Help:Templates|templates]], and edits to those templates may not always update immediately on articles. If you can't see the changes properly, purging the page can help. It is also recommended to [[Help:Bypass your cache|fully refresh your browser cache]] as that can also help.
 
For example, some pages often use [[Help:Templates|templates]], and edits to those templates may not always update immediately on articles. If you can't see the changes properly, purging the page can help. It is also recommended to [[Help:Bypass your cache|fully refresh your browser cache]] as that can also help.
Line 9: Line 8:
 
[[File:Purgeexample.png|thumb|right|300px|An example of a URL showing the purge command.]]
 
[[File:Purgeexample.png|thumb|right|300px|An example of a URL showing the purge command.]]
 
On any Fandom article page:
 
On any Fandom article page:
# At the end of the URL add the text <code>?action=purge</code>
+
# At the end of the URL, add the text<br /><code>?action=purge</code>
 
# Visit that link; the page should be refreshed in a short time
 
# Visit that link; the page should be refreshed in a short time
   
Note, if the URL includes an <code>#anchor</code>, remove that part before adding the purge code.
+
Note, if the URL includes an <code>#anchor</code>, make sure to add the purge code before that part.
   
 
Alternatively, you can make a [[Help:Glossary#Null edit|null edit]] by going into edit mode for the page and saving without making any changes.
 
Alternatively, you can make a [[Help:Glossary#Null edit|null edit]] by going into edit mode for the page and saving without making any changes.
 
{{Notice
 
|border=orange
 
|image=[[File:Bulb.png]]
 
|style=width: 100%;
 
|type=Purge from the Edit menu
 
|info=There's a nifty script at the Developer Wiki that adds a {{#NewWindowLink:w:c:dev:PurgeButton|<span style="color:blue;">PurgeButton</span>}} to your pages.<br >Clicking on the {{#NewWindowLink:w:c:dev:DisplayClock|<span style="color:blue;">DisplayClock</span>}} also purges the page, sparing you the URL editing.<br/>You can also use {{#NewWindowLink:w:c:dev:MassNullEdit|<span style="color:blue;">MassNullEdit</span>}} to purge a list of pages automatically.
 
}}
 
   
 
==How it works==
 
==How it works==
Line 35: Line 26:
 
==See also==
 
==See also==
 
* [[Help:Bypass your cache]], a general explanation of caching and how to clear your browser cache
 
* [[Help:Bypass your cache]], a general explanation of caching and how to clear your browser cache
* {{#NewWindowLink:homepage:w:User_blog:Wade_Warren/How_we_deliver_pages_to_you!|How we deliver pages to you!}}, a blog explaining why we use caching on Fandom and more on how it works
+
* [[w:User_blog:Wade_Warren/How_we_deliver_pages_to_you!|How we deliver pages to you!]], a blog explaining why we use caching on Fandom and more on how it works
   
 
[[ca:Ajuda:Actualitzar]]
 
[[ca:Ajuda:Actualitzar]]
Line 44: Line 35:
 
[[pl:Pomoc:Czyszczenie pamięci podręcznej]]
 
[[pl:Pomoc:Czyszczenie pamięci podręcznej]]
 
[[pt:Ajuda:Purge]]
 
[[pt:Ajuda:Purge]]
  +
[[ru:Справка:Purge]]
  +
[[tr:Yardım:Arındır]]
  +
[[uk:Довідка:Скидання кешу]]
  +
[[vi:Trợ giúp:Tẩy]]
  +
[[zh:help:Purge]]
 
[[Category:Administration help]]
 
[[Category:Administration help]]
 
[[Category:Help|{{PAGENAME}}]]
 
[[Category:Help|{{PAGENAME}}]]

Revision as of 08:38, 17 May 2020

The purge function is a handy way to clear a page's server cache. This forces the wiki software to rebuild the page completely.

For example, some pages often use templates, and edits to those templates may not always update immediately on articles. If you can't see the changes properly, purging the page can help. It is also recommended to fully refresh your browser cache as that can also help.

How to purge

Note: purging is usually very quick, but can potentially take a few minutes if the servers are very busy.
Purgeexample

An example of a URL showing the purge command.

On any Fandom article page:

  1. At the end of the URL, add the text
    ?action=purge
  2. Visit that link; the page should be refreshed in a short time

Note, if the URL includes an #anchor, make sure to add the purge code before that part.

Alternatively, you can make a null edit by going into edit mode for the page and saving without making any changes.

How it works

When a change is made to a page, the MediaWiki software saves the change to the main database. The next time a non-logged in user views the page, a copy of that page is made to a "server cache" on a set of secondary servers. Until the page is changed again, all non-logged in users who try to view that page will be shown the same copy from the server cache. That way, users who are viewing but not editing do not put a drain on the main database server, and still see the most recent version of the page.

Normally, when a change is made, the page is marked as "touched" and the software will create a new copy of the page for the server cache. However, when a change is made to a subpage or template, but not to the article page which transcludes it, the article page is not marked as "touched," and a new copy is not immediately generated for the cache. Therefore anyone viewing the article page may see a cached page which includes old versions of the subpage or template.

The purge command forces the server cache to purge the old version of the page. The next time the page is viewed, the page will be rebuilt from scratch, including fresh versions of all subpages and templates, and a new copy will be made for the server cache.

Note that this may take a few minutes in extreme cases. Given that it causes the servers more work, please avoid overusing the purge command.

See also