4 * Copyright 2004 $ThePhpWikiProgrammingTeam
5 * Copyright 2009 Marc-Etienne Vargenau, Alcatel-Lucent
7 * This file is part of PhpWiki.
9 * PhpWiki is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * PhpWiki is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License along
20 * with PhpWiki; if not, write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25 * Don't cache the following page. Mostly used for plugins, which
26 * display dynamic content.
30 * or to delete the whole cache for this page:
31 * <<NoCache nocache||=purge >>
33 * Author: Reini Urban <rurban@x-ray.at>
36 class WikiPlugin_NoCache
43 function getDescription() {
44 return _("Don't cache this page.");
47 function getDefaultArguments() {
48 return array( 'nocache' => 1 );
51 function run($dbi, $argstr, &$request, $basepage) {
52 $args = $this->getArgs($argstr, $request);
53 // works regardless of WIKIDB_NOCACHE_MARKUP
54 // if WIKIDB_NOCACHE_MARKUP is false it doesn't hurt
55 $request->setArg('nocache', $args['nocache']);
64 // c-hanging-comment-ender-p: nil
65 // indent-tabs-mode: nil