From 20f06adce23d5da89954109dd60f7eb83fad62fb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Laurent=20L=C3=A9cluse?= <laurent.lecluse@unicaen.fr>
Date: Fri, 21 Feb 2025 10:17:01 +0100
Subject: [PATCH] =?UTF-8?q?Plus=20de=20cache=20pour=20la=20liste=20des=20p?=
 =?UTF-8?q?rivil=C3=A8ges=20&=20roles?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 module/Application/src/Service/PrivilegeService.php | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/module/Application/src/Service/PrivilegeService.php b/module/Application/src/Service/PrivilegeService.php
index daacc51368..69592ad40f 100755
--- a/module/Application/src/Service/PrivilegeService.php
+++ b/module/Application/src/Service/PrivilegeService.php
@@ -2,7 +2,6 @@
 
 namespace Application\Service;
 
-use Application\Cache\Traits\CacheContainerTrait;
 use Application\Entity\Db\Privilege;
 use Application\Entity\Db\Role;
 use Application\Provider\Privilege\Privileges;
@@ -24,7 +23,6 @@ class PrivilegeService implements PrivilegeProviderInterface, ProviderInterface
     use EntityManagerAwareTrait;
     use ContextServiceAwareTrait;
     use StatutServiceAwareTrait;
-    use CacheContainerTrait;
 
 
     private array $privilegesCache       = [];
@@ -77,8 +75,8 @@ class PrivilegeService implements PrivilegeProviderInterface, ProviderInterface
      */
     public function getPrivilegesRoles()
     {
-        if (empty($this->privilegesCache)) {
-            $this->privilegesCache = $this->getCacheContainer()->privilegesRoles('makePrivilegesRoles');
+        if (empty($this->privilegesCache)){
+            $this->privilegesCache = $this->makePrivilegesRoles();
         }
         return $this->privilegesCache;
     }
-- 
GitLab