- 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

@ -1,24 +1,16 @@
<?php
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('tsviewer');
use phpFastCache\Util;
use phpFastCache\CacheManager;
Util\Languages::setEncoding("UTF-8");
$cache = CacheManager::Files();
$tsviewer = $cache->get('tsviewer');
// $cache->clean();
if (is_null($tsviewer)) {
$tsviewer = array(getViewer(), date('d-m-Y H:i:s'));
$cache->set('tsviewer', $tsviewer, 300);
if($cacheutils->isExpired()) {
$cacheutils->setValue([getViewer(), date('d-m-Y H:i:s')], 300);
}
$tsviewer = $cacheutils->getValue();
// print_r ($tsviewer);
function getViewer() {