'error', 'key' => 'flux', 'method' => 'read', 'data' => '' ]; $token = $request->headers->get('x-auth-token'); $security->isGranted('MAESTRO_PROJECT_PROJECTS_CREATE', $token); $flux = $fluxQuery->getFluxByProject($projectId); if ($flux) { $body['type'] = 'success'; $body['data'] = $flux; $respond->statusCreated(); //DELETE THE CACHE IF WE HAVE, BECAUSE THE VALUE WAS CHANGED $cache = new FilesystemAdapter(); $cache->clear(); //END DELETING CACHE } else { $respond->statusUnprocessableEntity(); } return $respond->createBody($body)->respond(); } }