devel:caching
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
devel:caching [2010-08-19 13:01] – [Two-Stage-Caching] 130.115.46.28 | devel:caching [2025-02-11 08:44] (current) – 2 spaces 217.175.54.43 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Caching ====== | ====== Caching ====== | ||
- | [[: | + | [[: |
===== Purging the cache ===== | ===== Purging the cache ===== | ||
Line 8: | Line 8: | ||
http:// | http:// | ||
- | To force recaching of all pages, including page instructions, | + | Some of your URL might look like this ''? |
+ | |||
+ | http:// | ||
+ | http:// | ||
+ | |||
+ | To force recaching of all pages, including page instructions, | ||
+ | |||
+ | **Note:** There is the [[plugin: | ||
To only force recaching of page xhtml, touch '' | To only force recaching of page xhtml, touch '' | ||
+ | |||
+ | To purge the editor toolbar (and other cached JavaScript) call | ||
+ | http:// | ||
+ | and clean up your browser' | ||
+ | |||
+ | You can also clear the CSS cache in the same way: | ||
+ | http:// | ||
===== Two-Stage-Caching ===== | ===== Two-Stage-Caching ===== | ||
Line 16: | Line 30: | ||
DokuWiki uses two cache files per page. To understand this you need to know that a page is parsed to an intermediate instruction format first before it is rendered to XHTML. DokuWiki caches both -- the instructions and the rendered XHTML. | DokuWiki uses two cache files per page. To understand this you need to know that a page is parsed to an intermediate instruction format first before it is rendered to XHTML. DokuWiki caches both -- the instructions and the rendered XHTML. | ||
- | * __Instruction Cache__ \\ The instruction cachefile only gets updated when the page, the config files(('' | + | * __Instruction Cache__ \\ The instruction cachefile only gets updated when the page, the config files(('' |
* __%%XHTML%% Cache__ \\ The XHTML cache is also affected by a maximum cache age setting ([[: | * __%%XHTML%% Cache__ \\ The XHTML cache is also affected by a maximum cache age setting ([[: | ||
Line 24: | Line 38: | ||
* '' | * '' | ||
* '' | * '' | ||
+ | |||
+ | ===== Metadata ===== | ||
+ | |||
+ | DokuWiki can also store [[metadata]] e.g. additional information of pages. Metadata is generated from the Instruction Cache, of which the XHTML of a page is generated too. The metadata has its own [[metadata# | ||
+ | |||
+ | Metadata can furthermore be added to the [[metadata# | ||
+ | |||
+ | ===== Images ===== | ||
+ | To improve the performance for the user, DokuWiki tries to cache external images. If someone wants to use an external image in the wiki content without caching or cache the image with a certain interval, there is [[: | ||
+ | |||
+ | FIXME howto link (external) images in plugins with caching. | ||
===== Plugins ===== | ===== Plugins ===== | ||
- | [[: | + | [[: |
- | ==== developer | + | ==== Developer |
- | Up until now plugin developers | + | A simple measure to avoid caching is that plugin developers turn off caching completely. This is discouraged due to the extra rendering activities, in particular adversely |
* save some information relating to the pages it's involved with and the dependency specific to each of those pages. | * save some information relating to the pages it's involved with and the dependency specific to each of those pages. | ||
- | * add an [[action_plugin]] component to handle the '' | + | * add an [[action plugin]] component to handle the '' |
- | Caching itself is handled by the cache object(('' | + | Caching itself is handled by the Cache object(('' |
* the '' | * the '' | ||
* '' | * '' | ||
* '' | * '' | ||
- | * '' | + | * '' |
- | * the cache name, '' | + | * the cache name, '' |
=== Individual Page Cache Expiry === | === Individual Page Cache Expiry === | ||
Line 48: | Line 73: | ||
/* code to expire the cached xhtml of page ns:page | /* code to expire the cached xhtml of page ns:page | ||
* $id = ' | * $id = ' | ||
- | * $data = array(' | + | * $data = array(' |
- | * $render = false; | + | * $render = false; |
- | * $persistent = false; | + | * $persistent = false; // this change doesn' |
+ | | ||
*/ | */ | ||
p_set_metadata($id, | p_set_metadata($id, | ||
</ | </ | ||
+ | |||
+ |
devel/caching.1282215696.txt.gz · Last modified: by 130.115.46.28