From 466d3168c409cf7fc81fada8e372127bc4ee1563 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gi=C3=B2=20Diani?= Date: Fri, 3 Jan 2025 16:44:17 +0100 Subject: [PATCH] Added caching (adjust setting in .env accordingly; CACHE_STORE=file) --- dashboard/.env.example | 2 +- dashboard/app/Api.php | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/dashboard/.env.example b/dashboard/.env.example index 064b7e8..e05afb4 100644 --- a/dashboard/.env.example +++ b/dashboard/.env.example @@ -38,7 +38,7 @@ BROADCAST_CONNECTION=log FILESYSTEM_DISK=local QUEUE_CONNECTION=database -CACHE_STORE=database +CACHE_STORE=file CACHE_PREFIX= MEMCACHED_HOST=127.0.0.1 diff --git a/dashboard/app/Api.php b/dashboard/app/Api.php index c337978..ec1b2f4 100644 --- a/dashboard/app/Api.php +++ b/dashboard/app/Api.php @@ -1,6 +1,7 @@ successful()){ - return $get->json(); + $result = $get->json(); + Cache::put($request, $result); + return $result; } return null;