[*] фикс кэширования

This commit is contained in:
rsgrinko committed 2021-12-22 22:34:45 +03:00
1 parent 8d0039e3e1
commit a70d4818a5
2 files changed
+3 -2

No files matched your search

+2 -1
View File
@@ -3,7 +3,8 @@ require_once __DIR__ . '/inc/bootstrap.php';
require_once __DIR__ . '/inc/header.php';
$cacheId = md5('CIoT::getDallasArrData_'.$USER['deviceId']);
if(CCache::check($cacheId)) {
if(CCache::check($cacheId) and CCache::getAge($cacheId) < 60) {
$arSensors = CCache::get($cacheId);
} else {
$arSensors = CIoT::getSensorsArrData($USER['deviceId']);