2 rcs_id('$Id: NoCache.php,v 1.2 2004-02-25 16:21:25 rurban Exp $');
4 Copyright 2004 $ThePhpWikiProgrammingTeam
6 This file is part of PhpWiki.
8 PhpWiki is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 PhpWiki is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with PhpWiki; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 * Don't cache the following page. Mostly used for plugins, which
25 * display dynamic content.
29 * or to delete the whole cache for this page:
30 * <?plugin NoCache nocache||=purge ?>
32 * Author: Reini Urban <rurban@x-ray.at>
35 class WikiPlugin_NoCache
42 function getDescription() {
43 return _("Don't cache this page.");
46 function getVersion() {
47 return preg_replace("/[Revision: $]/", '',
51 function getDefaultArguments() {
52 return array( 'nocache' => 1 );
55 function run($dbi, $argstr, &$request, $basepage) {
56 $args = $this->getArgs($argstr, $request);
57 // works regardless of WIKIDB_NOCACHE_MARKUP
58 // if WIKIDB_NOCACHE_MARKUP is false it doesn't hurt
59 return $request->setArg('nocache',$args['nocache']);
63 // $Log: not supported by cvs2svn $
64 // Revision 1.1 2004/02/24 17:34:26 rurban
65 // Don't cache the following page. Mostly used for plugins, which
66 // display dynamic content.
68 // ----------------------------------------------------------------------
76 // c-hanging-comment-ender-p: nil
77 // indent-tabs-mode: nil