mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-25 16:18:57 +01:00
* Admin: add used caching provider and APCu stats to "PHP Information"
This commit is contained in:
parent
5f3f550bd3
commit
1687476928
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$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
use EGroupware\Api;
|
||||||
|
|
||||||
$GLOBALS['egw_info']['flags'] = array(
|
$GLOBALS['egw_info']['flags'] = array(
|
||||||
'noheader' => True,
|
'noheader' => True,
|
||||||
'nonavbar' => True,
|
'nonavbar' => True,
|
||||||
@ -20,4 +22,22 @@ if ($GLOBALS['egw']->acl->check('info_access',1,'admin'))
|
|||||||
$GLOBALS['egw']->redirect_link('/index.php');
|
$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();
|
||||||
|
$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];
|
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
|
* Get a system configuration, even if in setup and it's not read
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user