4 +-----------------------------------------------------------------------+
5 | program/steps/utils/killcache.inc |
7 | This file is part of the Roundcube Webmail client |
8 | Copyright (C) 2005-2010, The Roundcube Dev Team |
9 | Licensed under the GNU GPL |
12 | Delete rows from cache and messages tables |
14 +-----------------------------------------------------------------------+
15 | Author: Dennis P. Nikolaenko <dennis@nikolaenko.ru> |
16 +-----------------------------------------------------------------------+
18 $Id: killcache.inc 4410 2011-01-12 18:25:02Z thomasb $
22 // don't allow public access if not in devel_mode
23 if (!$RCMAIL->config->get('devel_mode')) {
24 header("HTTP/1.0 401 Access denied");
25 die("Access denied!");
29 'use_transactions' => false,
30 'log_line_break' => "\n",
31 'idxname_format' => '%s',
33 'quote_identifier' => true,
34 'force_defaults' => false,
38 // @TODO: transaction here (if supported by DB) would be a good thing
39 $res = $RCMAIL->db->query("DELETE FROM cache");
40 if (PEAR::isError($res)) {
41 exit($res->getMessage());
44 $res = $RCMAIL->db->query("DELETE FROM messages");
45 if (PEAR::isError($res)) {
46 exit($res->getMessage());
49 echo "Cache cleared\n";