Help:Caching

From Heroes Wiki
Jump to: navigation, search

Help
General Help
Special Topics
For more help...

Contact an administrator

Or leave a message

Heroes Wiki eases its bandwidth and server load requirements by using caching.

Browser Caching

The main means by which Heroes Wiki uses caching is by allowing users' internet browsers to keep a cache of its articles and other pages on the users' local machines. Many browsers have an option to store pages in a local cache for later viewing and may also refer to that cache instead of the wiki itself on previous viewings depending on the browser's settings. Depending on a user's browser, clicking "refresh" or "reload" on the browser may normally bring up the latest version of a Heroes Wiki page. Browsers often include options for how page text content is stored, but do not always have options for images, audio files, and software scripts. For those browsers, bypassing or clearing the cache completely may be the only way to immediately access an updated image or audio file. (See how to clear the cache below.) Wikipedia has instructions for doing so for the main types of browsers.

Changes to software scripts on Heroes Wiki pages also often require clearing the browser cache, and sometimes a restart of the browser itself as the code may still be running in the browser even after the cache is cleared. Heroes Wiki uses a scripting called cascading style sheets (CSS) to add default style formatting to Heroes Wiki pages. In addition, Heroes Wiki uses JavaScript to add other features such as collapsible tables.

Server Caching

Heroes Wiki pages can use multiple templates and multiple categories meaning the server has to compile information from multiple sources in order to completely display a page. To lessen the load this would normally imply, the Heroes Wiki server uses caching such that whenever a page is saved on the wiki, a complete copy of the page is put into server cache. Subsequent viewings of the saved page then refer to the server's cache of that page until a portion of the page is re-edited or that page's cache is purged.

There are a couple of exceptions to that description of server caching. The most common exception is in regards to categories. When a page is saved with a tag for a particular category, the server automatically adds an entry to the respective category page with the added page's name. However, when a page is removed from that category, the category page update does not always happen immediately and often requires a form of purging to remove the page from the category's list of articles. (See how to purge below.) Also, when a category page is created after it has been used, it normally requires purging to force the server to search for and immediately include those pages that were categorized before it existed. The server's cache auto-updates itself eventually to include those pages, but the process that does so normally takes a few hours.

Another exception is related to an extension Heroes Wiki uses called Dynamic Page List (DPL). This extension uses it's own form of markup on a page to create a dynamic list using the content and names of other pages in a wiki's database. There is an option in DPL to access content from the server's cache, and that option has been set to be always on at Heroes Wiki. Thus, if a template uses DPL on a page, the server's cache of that page must be cleared for changes to be immediately viewable. If the DPL is adding pages based on whether a page has been added to a category, removing a page from the list may require not only purging the page containing the DPL markup, but also purging the category of the page that has been removed and/or the page that has been removed itself. Like with the previous situation, the server's cache will eventually auto-update the DPL listings. However, if that is not desired, purging can be applied.

How to Clear the Cache

To clear the cache on most browsers, press the refresh button which is usually at the top of your browser's page. You can also press F5 or CTRL + F5 to accomplish the same thing.

How to Purge

There are a few ways for ordinary users or unregistered visitors to purge the Heroes Wiki server's cache.

From any Heroes Wiki page:

  1. At the end of the URL in the address bar of your browser, append the text ?action=purge.
  2. Press [Enter] or click "Go" to tell the browser to go to that revised URL.
  3. The page should be refreshed in a short time.

or:

  1. Click the "edit this page" tab.
  2. In the address bar in your browser, at the end of the URL, where you see &action=edit, replace "edit" with "purge," so it now reads &action=purge.
  3. Press [Enter] or click "Go" to tell the browser to go to that revised URL.
  4. The page should be refreshed in a short time.

From editable pages:

  1. Click the "edit this page" tab and preview the page.
  2. Then click save without making any changes. No changes will be saved, but the cache will have been cleared.

External Links