dolibarr  7.0.0-beta
xcache.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2009-2012 Laurent Destailleur <eldy@users.sourceforge.net>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
23 require '../../main.inc.php';
24 
25 $langs->load("admin");
26 
27 if (!$user->admin) accessforbidden();
28 
29 $action=GETPOST('action','aZ09');
30 
31 
32 /*
33  * View
34  */
35 
36 llxHeader();
37 
38 print load_fiche_titre("XCache",'','title_setup');
39 
40 print "<br>\n";
41 
42 //function_exists('apc_cache_info') || function_exists('eaccelerator_info') || function_exists('xcache_info'))
43 if (!function_exists('xcache_info'))
44 {
45  print 'XCache seems to be not installed. Function xcache_info not found.';
46  llxFooter();
47  exit;
48 }
49 
50 
51 print 'Opcode cache XCache is on<br><br>'."\n\n";
52 
53 print $langs->trans("Split").': '.ini_get('xcache.count').' &nbsp; &nbsp; &nbsp; '.$langs->trans("Recommanded").': (cat /proc/cpuinfo | grep -c processor) + 1<br>'."\n";
54 print $langs->trans("Size").': '.ini_get('xcache.size').' &nbsp; &nbsp; &nbsp; '.$langs->trans("Recommanded").': 16*Split<br>'."\n";
55 
56 print $langs->trans("xcache.cacher").': '.yn(ini_get('xcache.cacher')).'<br>'."\n";
57 print $langs->trans("xcache.optimizer").': '.yn(ini_get('xcache.optimizer')).' (will be usefull only with xcache v2)<br>'."\n";
58 print $langs->trans("xcache.stat").': '.yn(ini_get('xcache.stat')).'<br>'."\n";
59 print $langs->trans("xcache.coverager").': '.yn(ini_get('xcache.coverager')).'<br>'."\n";
60 
61 //print xcache_get();
62 /*
63 $cacheinfos = array();
64 for ($i = 0; $i < 10; $i ++)
65 {
66  $data = xcache_info(XC_TYPE_PHP, $i);
67  $data['cacheid'] = $i;
68  $cacheinfos[] = $data;
69 }
70 
71 var_dump($cacheinfos);
72 
73 if ($action == 'clear')
74 {
75  xcache_clear_cache();
76 }
77 */
78 
79 llxFooter();
80 
81 $db->close();
llxFooter()
Empty footer.
Definition: wrapper.php:58
yn($yesno, $case=1, $color=0)
Return yes or no in current language.
GETPOST($paramname, $check='none', $method=0, $filter=NULL, $options=NULL, $noreplace=0)
Return value of a param into GET or POST supervariable.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
load_fiche_titre($titre, $morehtmlright='', $picto='title_generic.png', $pictoisfullpath=0, $id=0, $morecssontable='', $morehtmlcenter='')
Load a title with picto.
llxHeader()
Empty header.
Definition: wrapper.php:46
print
Draft customers invoices.
Definition: index.php:91