From 45680cab47bbc5ca88afa636a53dd1f56dbe8d19 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 3 Apr 2021 10:53:41 -0700 Subject: [PATCH] Don't use tagging, closes #3224 --- .../Api/Client/Servers/ResourceUtilizationController.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/Http/Controllers/Api/Client/Servers/ResourceUtilizationController.php b/app/Http/Controllers/Api/Client/Servers/ResourceUtilizationController.php index 72901c8b..5b80768b 100644 --- a/app/Http/Controllers/Api/Client/Servers/ResourceUtilizationController.php +++ b/app/Http/Controllers/Api/Client/Servers/ResourceUtilizationController.php @@ -42,11 +42,10 @@ class ResourceUtilizationController extends ClientApiController */ public function __invoke(GetServerRequest $request, Server $server): array { - $stats = $this->cache - ->tags(['resources']) - ->remember($server->uuid, Carbon::now()->addSeconds(20), function () use ($server) { - return $this->repository->setServer($server)->getDetails(); - }); + $key = "resources:{$server->uuid}"; + $stats = $this->cache->remember($key, Carbon::now()->addSeconds(20), function () use ($server) { + return $this->repository->setServer($server)->getDetails(); + }); return $this->fractal->item($stats) ->transformWith($this->getTransformer(StatsTransformer::class))