- Updated local libraries
- PHP 7.1 support
- New, proper caching method
- Special cache folder
This commit is contained in:
Wruczek
2017-01-29 22:56:17 +01:00
parent af2d44a713
commit 1ffaee0730
110 changed files with 8445 additions and 4370 deletions

View File

@ -2,23 +2,15 @@
$bansPage = true;
require_once __DIR__ . "/include/header.php";
require_once __DIR__ . "/include/tsutils.php";
require_once __DIR__ . "/lib/phpfastcache/autoload.php";
require_once __DIR__ . "/include/cacheutils.class.php";
$cacheutils = new CacheUtils('banlist');
use phpFastCache\Util;
use phpFastCache\CacheManager;
Util\Languages::setEncoding("UTF-8");
$cache = CacheManager::Files();
$banlist = $cache->get('banlist');
// $cache->clean();
if (is_null($banlist)) {
$banlist = array(getBanlist(), date('d-m-Y H:i:s'));
$cache->set('banlist', $banlist, 600);
if($cacheutils->isExpired()) {
$cacheutils->setValue([getBanlist(), date('d-m-Y H:i:s')], 300);
}
$banlist = $cacheutils->getValue();
?>
<div class="panel panel-default">