Don't use tagging, closes #3224
This commit is contained in:
parent
a7b60c0f52
commit
45680cab47
1 changed files with 4 additions and 5 deletions
|
@ -42,11 +42,10 @@ class ResourceUtilizationController extends ClientApiController
|
||||||
*/
|
*/
|
||||||
public function __invoke(GetServerRequest $request, Server $server): array
|
public function __invoke(GetServerRequest $request, Server $server): array
|
||||||
{
|
{
|
||||||
$stats = $this->cache
|
$key = "resources:{$server->uuid}";
|
||||||
->tags(['resources'])
|
$stats = $this->cache->remember($key, Carbon::now()->addSeconds(20), function () use ($server) {
|
||||||
->remember($server->uuid, Carbon::now()->addSeconds(20), function () use ($server) {
|
return $this->repository->setServer($server)->getDetails();
|
||||||
return $this->repository->setServer($server)->getDetails();
|
});
|
||||||
});
|
|
||||||
|
|
||||||
return $this->fractal->item($stats)
|
return $this->fractal->item($stats)
|
||||||
->transformWith($this->getTransformer(StatsTransformer::class))
|
->transformWith($this->getTransformer(StatsTransformer::class))
|
||||||
|
|
Loading…
Reference in a new issue