From 1e0b246d7498d4da3e19d48e47556829bb379dca Mon Sep 17 00:00:00 2001 From: Ibnu Maksum Date: Tue, 6 Feb 2024 16:43:06 +0700 Subject: [PATCH] Cache for 12 hours --- system/controllers/dashboard.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/controllers/dashboard.php b/system/controllers/dashboard.php index 7f28e051..a8a1d102 100644 --- a/system/controllers/dashboard.php +++ b/system/controllers/dashboard.php @@ -124,8 +124,8 @@ if(file_exists($cacheMRfile) && time()- filemtime($cacheMRfile) < 3600){ } $cacheMSfile = File::pathFixer('system/cache/monthlySales.json'); -//Cache for 24 hours -if(file_exists($cacheMSfile) && time()- filemtime($cacheMSfile) < 86400){ +//Cache for 12 hours +if(file_exists($cacheMSfile) && time()- filemtime($cacheMSfile) < 43200){ $monthlySales = json_decode(file_get_contents($cacheMSfile), true); }else{ // Query to retrieve monthly data