forked from extern/egroupware
* Admin: add used caching provider and APCu stats to "PHP Information"
This commit is contained in:
parent
f89142629a
commit
4f4530b98d
1166
admin/apcu.php
Normal file
1166
admin/apcu.php
Normal file
File diff suppressed because it is too large
Load Diff
@ -8,6 +8,8 @@
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
use EGroupware\Api;
|
||||
|
||||
$GLOBALS['egw_info']['flags'] = array(
|
||||
'noheader' => True,
|
||||
'nonavbar' => True,
|
||||
@ -20,4 +22,22 @@ if ($GLOBALS['egw']->acl->check('info_access',1,'admin'))
|
||||
$GLOBALS['egw']->redirect_link('/index.php');
|
||||
}
|
||||
|
||||
$cache_provider = Api\Cache::getProvider();
|
||||
$cache_info = '<table><tbody><tr>';
|
||||
$cache_info .= '<td class="e">EGroupware caching provider</td><td class="v">'.Api\Cache::getProvider();
|
||||
if ($cache_provider == 'EGroupware\\Api\\Cache\\Apcu')
|
||||
{
|
||||
$cache_info .= ' <a href="'.htmlspecialchars(Api\Egw::link('/admin/apcu.php')).'">View APCu stats</a>';
|
||||
}
|
||||
$cache_info .= '</td></tr></tbody></table>'."\n";
|
||||
|
||||
ob_start();
|
||||
phpinfo();
|
||||
$phpinfo = ob_get_clean();
|
||||
|
||||
$info = str_ireplace('<body><div class="center">', '<body><div class="center">'."\n".$cache_info, $phpinfo);
|
||||
if ($info == $phpinfo)
|
||||
{
|
||||
echo $cache_info;
|
||||
}
|
||||
echo $info;
|
||||
|
@ -559,6 +559,19 @@ class Cache
|
||||
return $providers[$level];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get class-name of caching provider
|
||||
*
|
||||
* @param string $level
|
||||
* @return string class-name of provider
|
||||
*/
|
||||
public static function getProvider($level=self::INSTANCE)
|
||||
{
|
||||
$provider = self::get_provider($level);
|
||||
|
||||
return get_class($provider);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a system configuration, even if in setup and it's not read
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user