Re: manage caching of form actions (kwiki)
amb-Uxr6IM1mbv2TY6FTCsQk+9Bc4/[email protected] (Andrew M. Bishop)
| Newsgroups | gmane.network.wwwoffle.user |
|---|---|
| Message-ID | <[email protected]> |
mi <[email protected]> writes: > Hello, i'm trying kwiki first time, and wonder how to get wwwoffle > not to cache edit / post actions. > > Some wwwoffle index entries of http://kwiki.org: > > > /index.cgi?!action=edit&page_id=SandBox!POST:BJdjCGSpGT6m1qQmYlto9g.40ffde34 > > /index.cgi?SandBox > > I wonder that both show the same content, of http://kwiki.org/index.cgi?SandBox. > > There's little javascript inside, afaics works like > > > a href="index.cgi?action=edit&page_id=SandBox" accesskey="e" title="Edit This Page"> > > for editing and > > > <form method="post" action="index.cgi" enctype="application/x-www-form-urlencoded" style="display: inline"> > > for posting. Can i have wwwoffle to not cache the edit and post actions, *but* > still do cache ~/index.cgi?Sandbox ? > > However, i'd like to cache some special edit actions, to be able to lookup sourcers offline: > > [Löschen] /index.cgi?action=edit&page_id=SandBox > [Löschen] /index.cgi?action=edit&page_id=KwikiFormattingRules > > Can i just put parameters like ?action= inside the DontCache section ? You can indeed do this in the DontCache (or DontGet or ...) sections of the configuration file. An entry like the following one will not cache any URLs that have arguments that start with the string "action=". DontCache { *://kwiki.org/*?action=* } You will need to chose carefully the entries that you put into the DontCache section of the configuration file. There are some pages that you want to cache and some that you don't want to cache. The first URL match in the configuration file will be the one that is used. You can use a '!' before an entry to mean that the opposite action is performed. For example the following means that any URLs with the arguments starting 'action=view' are cached but any other starting with 'action=' are not cached. DontCache { !*://kwiki.org/*?action=view *://kwiki.org/*?action=* } -- Andrew. ---------------------------------------------------------------------- Andrew M. Bishop amb-Uxr6IM1mbv2TY6FTCsQk+9Bc4/[email protected] http://www.gedanken.demon.co.uk/ WWWOFFLE users page: http://www.gedanken.demon.co.uk/wwwoffle/version-2.8/user.html