DENYTOPICVIEW
or ALLOWTOPICVIEW
are empty
WebPreferences
of a web, DENYWEBVIEW
and ALLOWWEBVIEW
are empty.
NOCACHE
variable is NOT set, neither in the Topic nor in WebPreferences
CACHE
variable is set with a value.
?skin=plain
Time | Experiment |
---|---|
40 ms | cached Topic with no CACHE or NOCACHE variables in |
76 ms | cached Topic with CACHE or NOCACHE variables in |
3358 ms | rerended Topic with cache chooser |
3276 ms | directly rendered Topic without cache chooser |
82 ms | overhead through cache chooser programm |
The measurement was done on a 700 MHz PC. In fact the little overhead of about 80 ms when rendering via the cache chooser does really not take much into account of the over 3 seconds rendering time, while the speed of Topics from cache is relatively really fast, especially for Topics which need not processed for variables again.
Set NOCACHE
somewhere in the document.
<!-- Set NOCACHE -->
Set NOCACHE
in the WebPreferences
of that web.
Set CACHE = cache
WebPrefrerences
in each Web
If the CACHE variable has a time information included instead of the word cache
, it will rerender the Topic after timeout is reached. The format includes one string after the equal sign that has to be separated by one space on each sides! The format includes m=minutes, h=hours, d=days, w=weeks and M=months. Several time settings can be set together and are separated by " -
" to build up one string! The letters follow directly after the number of time. Examples:
There are limitations in specifiable numbers:
Especially for the CalendarPlugin the option daily
will cause the Topic rerendered for the actual day to display the calendar properly, so set:
Set ALLOWTOPICVIEW = Main. ...
or Set DENYTOPICVIEW = Main. ...
is set or
WebPreferences
of a web Set ALLOWWEBVIEW = Main. ...
or Set DENYWEBVIEW = Main. ...
is set, followed by a user or group, caching is disabled. If activated later, the copy in the cache will be removed.
Set ALLOWTOPICVIEW =Main.TWikiGuest
Set ALLOWTOPICVIEW = TWikiGuest
Note: You do not need to install anything on the browser to use this add-on. The following instructions are for the administrator who installs the add-on on the server where TWiki is running.
CacheChooserAddOn.zip
ZIP file from TWiki:Plugins.CacheChooserAddOn
CacheChooserAddOn.zip
in your twiki installation directory. Content:
File: | Description: |
---|---|
data/TWiki/CacheChooserAddOn.txt | Add-on topic |
data/TWiki/CacheChooserAddOn.txt,v | Add-on topic repository |
bin/cache | Add-on script |
bin/render | original view script |
bin/view | link to cache |
bin/refresh | link to cache |
cache/.htcacherr.log | log file of wrong CACHE variable entries |
/your/twiki/template/view.tmpl
to have a refresh function,
e.g. next to the the "More" link:%TMPL:P{"sep"}% <a href="%SCRIPTURLPATH%/refresh%SCRIPTSUFFIX%/%WEB%/%TOPIC%">Refresh</a>
302 Moved
messages cause wrong Localisation
redirect, when view script is called with different name. Workaround is to use the ?refresh=cache
option instead of the link refresh
for the refresh button, e.g.: %TMPL:P{"sep"}% <a href="%SCRIPTURLPATH%/view%SCRIPTSUFFIX%/%WEB%/%TOPIC%?refresh=cache">Refresh</a>
deny from all
Add-on Author: | TWiki:Main/JensRoeder |
Add-on Version: | 30 Mar 2005 (v1.000) |
Change History: | |
30 Mar 2005: | Initial version |
CPAN Dependencies: | none |
Other Dependencies: | none |
Perl Version: | 5.005 |
License: | GPL |
Add-on Home: | http://TWiki.org/cgi-bin/view/Plugins/CacheChooserAddOn |
Feedback: | http://TWiki.org/cgi-bin/view/Plugins/CacheChooserAddOnDev |
Appraisal: | http://TWiki.org/cgi-bin/view/Plugins/CacheChooserAddOnAppraisal |
Related Topic: TWikiAddOns?
-- TWiki:Main/JensRoeder - 30 Mar 2005