From 5a69cce75547fe41fbfa2c77ca80b92aff449388 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Fri, 27 Oct 2023 16:17:38 +0200 Subject: [PATCH] fix cache --- cache/cache.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cache/cache.php b/cache/cache.php index b885f9b..02dc0ff 100644 --- a/cache/cache.php +++ b/cache/cache.php @@ -25,10 +25,8 @@ class cache { */ public static function get($cache, $ident,$header = false){ $result = \SYSTEM\SQL\SYS_CACHE_CHECK::Q1(array($cache,$ident)); - if(!$result){ + if(!$result || $result['data'] == NULL || !file_exists($result['data'])){ return NULL;} - if(!file_exists($result['data'])){ - return NULL;} if($header){ if(\SYSTEM\HEADER::available($result['type'])){ @@ -60,7 +58,7 @@ class cache { \fwrite($file, $data); \fclose($file); - $result = \SYSTEM\SQL\SYS_CACHE_PUT::Q1(array($cache,$ident, $type, $path)); + $result = \SYSTEM\SQL\SYS_CACHE_PUT::QI(array($cache,$ident, $type, $path)); return $result ? $data : NULL; }