From ed0d76df255bbd3049fd58c0310c5e7cb8057f4b Mon Sep 17 00:00:00 2001 From: cp6 Date: Sun, 15 May 2022 00:45:33 +1000 Subject: [PATCH] Updated servers index cache time to 1 month Updated servers index cache time to 1 month --- app/Http/Controllers/ServerController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/ServerController.php b/app/Http/Controllers/ServerController.php index 9bfa2cc..c05ce5f 100644 --- a/app/Http/Controllers/ServerController.php +++ b/app/Http/Controllers/ServerController.php @@ -23,7 +23,7 @@ class ServerController extends Controller public function index() { - $servers = Cache::remember('all_active_servers', 1440, function () { + $servers = Cache::remember('all_active_servers', now()->addMonth(1), function () { return DB::table('servers as s') ->join('pricings as pr', 's.id', '=', 'pr.service_id') ->join('providers as p', 's.provider_id', '=', 'p.id') @@ -33,7 +33,7 @@ class ServerController extends Controller ->get(['s.*', 'pr.currency', 'pr.price', 'pr.term', 'pr.as_usd', 'pr.next_due_date', 'p.name as provider_name', 'l.name as location', 'o.name as os_name']); }); - $non_active_servers = Cache::remember('non_active_servers', 1440, function () { + $non_active_servers = Cache::remember('non_active_servers', now()->addMonth(1), function () { return DB::table('servers as s') ->join('pricings as pr', 's.id', '=', 'pr.service_id') ->join('providers as p', 's.provider_id', '=', 'p.id')