Update (stat refresh time)

This commit is contained in:
2023-11-28 17:38:49 +08:00
parent 28f40e9760
commit c87032c2e6

View File

@@ -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();
});