phpldapadmin/htdocs/purge_cache.php

44 lines
709 B
PHP
Raw Normal View History

2009-06-30 09:22:30 +00:00
<?php
2009-06-30 09:40:37 +00:00
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/purge_cache.php,v 1.6 2005/07/22 06:12:51 wurley Exp $
2009-06-30 09:29:51 +00:00
/**
* @package phpLDAPadmin
*/
/**
*/
2009-06-30 09:22:30 +00:00
require './common.php';
include './header.php';
2009-06-30 09:29:51 +00:00
$purge_session_keys = array('cache','tree','tree_icons');
2009-06-30 09:22:30 +00:00
?>
<body>
<h3 class="title">Purging Caches</h3>
<br />
<br />
<br />
<center>
<?php
$size = 0;
2009-06-30 09:29:51 +00:00
foreach ($purge_session_keys as $key) {
if (isset($_SESSION[$key])) {
$size += strlen(serialize($_SESSION[$key]));
unset($_SESSION[$key]);
}
2009-06-30 09:22:30 +00:00
}
session_write_close();
2009-06-30 09:29:51 +00:00
if (! $size)
2009-06-30 09:22:30 +00:00
echo $lang['no_cache_to_purge'];
2009-06-30 09:29:51 +00:00
2009-06-30 09:22:30 +00:00
else
2009-06-30 09:29:51 +00:00
echo sprintf($lang['done_purging_caches'],number_format($size));
2009-06-30 09:22:30 +00:00
?>
</center>
</body>
</html>