From c87032c2e60d999f59a5a09769216f419c7a22e9 Mon Sep 17 00:00:00 2001 From: Charles T Date: Tue, 28 Nov 2023 17:38:49 +0800 Subject: [PATCH] Update (stat refresh time) --- app/View/Composers/StatsComposer.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/View/Composers/StatsComposer.php b/app/View/Composers/StatsComposer.php index 915e3de..bd1bed3 100644 --- a/app/View/Composers/StatsComposer.php +++ b/app/View/Composers/StatsComposer.php @@ -10,8 +10,10 @@ class StatsComposer { public function compose(View $view) { + + $seconds_to_remember = 600; // Retrieve the count from the cache or count and store it if not present - $tools_count = Cache::remember('tools_count', 600, function () { + $tools_count = Cache::remember('tools_count_' . $seconds_to_remember, $seconds_to_remember, function () { return AiTool::count(); });