Merge branch 'develop' into feature/react-admin

This commit is contained in:
Matthew Penner 2021-05-18 17:07:25 -06:00
commit a3b59f24af
95 changed files with 2671 additions and 1777 deletions

View file

@ -36,11 +36,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))