%SEARCH{}% and %INCLUDE{}%.
This Plugin caches all %VARIABLES% located in a topic so that the topic can get rendered as quickly as one without variables. An outdated cache gets refreshed when a user is looking at a topic; in which case it will take longer to render the page. Time-based refresh can also be disabled in favor of an on-demand cache update.
The rendering of TWiki markup to HTML is not cached. That is, user specific HTML rendering based on skin settings is not affected by the caching.
%VARCACHE{}% variable to the topic you want to cache | Parameter | Description | Default |
|---|---|---|
"..." orrefresh="..." | Cache refresh period in hours, e.g. maximum age of cache | REFRESH Plugin setting |
cachemsg="..." | Message shown when looking at a cached topic Note: Use $age to indicate the age of cache, $link to indicate the refresh URL | CACHEMSG Plugin setting |
updatemsg="..." | Message shown after a cache refresh Note: Use $link to indicate the refresh URL | UPDATEMSG Plugin setting |
%VARCACHE{}% variable gets: cachemsg message when looking at a cached topic
updatemsg message if the cache has just been updated
%VARCACHE{}% variable)
?varcache=refresh URL parameter (usually by following the refresh link in the cache message)
varcache (e.g. to show dynamic content properly, such as table sorting, filtering, searching)
%WIKIUSERNAME% of the person who refreshed the cache (on demand or by looking at a topic with an expired cache)
data/debug.txt) 0, default: 24 $age to indicate age of cache, $link to indicate the refresh URL:
VarCachePlugin.zip in your twiki installation directory. Content: | File: | Description: |
|---|---|
data/TWiki/VarCachePlugin.txt | Plugin topic |
data/TWiki/VarCachePluginTest.txt | Plugin test topic |
data/TWiki/VarVARCACHE.txt | Variable documentation topic |
lib/TWiki/Plugins/VarCachePlugin.pm | Plugin Perl module |
pub/TWiki/VarCachePlugin/cachetopic.gif | Cache icon 16x16 |
?varcache=refresh parameter to the URL
| Plugin Author: | TWiki:Main.PeterThoeny |
| Copyright: | © 2004-2011, Peter Thoeny, Twiki, Inc. © 2008-2011 TWiki:TWiki.TWikiContributor |
| License: | GPL (GNU General Public License |
| Plugin Version: | 2011-05-25 |
| Change History: | |
| 2011-05-25: | TWikibug:Item6701 |
| 2011-05-24: | TWikibug:Item6730 |
| 2011-05-01: | TWikibug:Item6701 |
| 2010-04-25: | TWikibug:Item6433 |
| 2010-04-06: | TWikibug:Item5414 |
| 2006-01-06: | Small fix for TWiki 4.0 |
| 2004-07-16: | Doc improvements (no code change) |
| 2004-07-15: | Initial version |
| TWiki Dependency: | $TWiki::Plugins::VERSION 1.1 (TWiki 4.0, 2006-02-01) |
| CPAN Dependencies: | none |
| Other Dependencies: | none |
| Perl Version: | 5.005 |
| TWiki:Plugins/Benchmark |
GoodStyle 99%, FormattedSearch 99%, VarCachePluginTest 208% |
| Plugin Home: | http://TWiki.org/cgi-bin/view/Plugins/VarCachePlugin |
| Feedback: | http://TWiki.org/cgi-bin/view/Plugins/VarCachePluginDev |
| Appraisal: | http://TWiki.org/cgi-bin/view/Plugins/VarCachePluginAppraisal |