hotfix CCache and enable use cache

This commit is contained in:
rsgrinko committed 2021-12-03 23:03:55 +03:00
1 parent 1e7ba3faa6
commit c8ae9af72b
2 files changed
+1 -2

No files matched your search

-1
View File
@@ -70,7 +70,6 @@ function pre($arr, $stop = false) {
*/
function isHaveAccessToDevice($deviceId, $userId){
$cacheId = md5('isHaveAccessToDevice_'.$deviceId.'_'.$userId);
echo $cacheId;
if(CCache::checkCache($cacheId)){
$arDevice = CCache::getCache($cacheId);
} else {
+1 -1
View File
@@ -190,7 +190,7 @@ class CCache
*/
public static function ageOfCache(string $name)
{
return (time() - filectime(self::$cache_dir . md5($name) . '.tmp'));
return (time() - @filectime(self::$cache_dir . md5($name) . '.tmp'));
}
}