Help:Caching: Difference between revisions
imported>MiamiVolts add some more; almost done |
imported>MiamiVolts finish article |
||
| Line 10: | Line 10: | ||
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. |
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 as 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 the same 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. Also, when a category page 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. |
|||
There are a couple of exceptions to that description of server caching. One of the extensions Heroes Wiki uses is [http://semeb.com/dpldemo/index.php?title=DPL:Manual 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. |
|||
{{sectstub}} |
|||
Another exception is related to an extension Heroes Wiki uses called [http://semeb.com/dpldemo/index.php?title=DPL:Manual 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; but if that is not desired, purging can be applied. |
|||
There are a few ways on Heroes Wiki for ordinary users or unregistered visitors to purge the server's cache. |
|||
From any Heroes Wiki page: |
|||
:# At the end of the [[URL]] in the address bar of your browser, append the text <tt>?action=purge</tt> |
|||
:# Press [Enter] or click "Go" to tell the browser to go to that revised URL |
|||
:# The page should be refreshed in a short time |
|||
or: |
|||
:# Click the "edit this page" tab |
|||
:# In the address bar in your browser, at the end of the URL, where you see <tt>&action=edit</tt>, replace "edit" with "purge," so it now reads <tt>&action=purge</tt> |
|||
:# Press [Enter] or click "Go" to tell the browser to go to that revised URL |
|||
:# The page should be refreshed in a short time |
|||
From editable pages: |
|||
:# Click the "edit this page" tab and preview the page |
|||
:# Then click save without making any changes. No changes will be saved, but the cache will have been cleared. |
|||
==See Also== |
==See Also== |
||
Revision as of 04:46, 15 December 2008
| 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. 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 as 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 the same 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. Also, when a category page 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; but if that is not desired, purging can be applied.
There are a few ways on Heroes Wiki for ordinary users or unregistered visitors to purge the server's cache.
From any Heroes Wiki page:
- At the end of the URL in the address bar of your browser, append the text ?action=purge
- Press [Enter] or click "Go" to tell the browser to go to that revised URL
- The page should be refreshed in a short time
or:
- Click the "edit this page" tab
- 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
- Press [Enter] or click "Go" to tell the browser to go to that revised URL
- The page should be refreshed in a short time
From editable pages:
- Click the "edit this page" tab and preview the page
- Then click save without making any changes. No changes will be saved, but the cache will have been cleared.