v 1.4.0
- Updated local libraries - PHP 7.1 support - New, proper caching method - Special cache folder
This commit is contained in:
@ -1,23 +1,14 @@
|
||||
<?php
|
||||
require_once __DIR__ . "/tsutils.php";
|
||||
require_once __DIR__ . "/../lib/phpfastcache/autoload.php";
|
||||
require_once __DIR__ . "/cacheutils.class.php";
|
||||
|
||||
$cacheutils = new CacheUtils('adminlist');
|
||||
|
||||
use phpFastCache\Util;
|
||||
use phpFastCache\CacheManager;
|
||||
|
||||
Util\Languages::setEncoding("UTF-8");
|
||||
$cache = CacheManager::Files();
|
||||
|
||||
$adminlist = $cache->get('adminlist');
|
||||
|
||||
// $cache->clean();
|
||||
|
||||
if (is_null($adminlist)) {
|
||||
$adminlist = array(getAdminList(), date('d-m-Y H:i:s'));
|
||||
$cache->set('adminlist', $adminlist, 30);
|
||||
if($cacheutils->isExpired()) {
|
||||
$cacheutils->setValue([getAdminList(), date('d-m-Y H:i:s')], 30);
|
||||
}
|
||||
|
||||
$adminlist = $cacheutils->getValue();
|
||||
|
||||
// FUNCTIONS
|
||||
|
||||
|
Reference in New Issue
Block a user