瀏覽代碼

delete apcuCache pour les modules

Vincent GUFFON 4 年之前
父節點
當前提交
25c8951a03
共有 1 個文件被更改,包括 8 次插入7 次删除
  1. 8 7
      src/Service/Security/Module.php

+ 8 - 7
src/Service/Security/Module.php

@@ -36,16 +36,17 @@ class Module
     }
 
     /**
+     * @todo activer le cache après que la fin de la migration.
      * Récupère tous les modules de l'oganisation
      * @param Organization $organization
      * @return array
      */
     public function getOrganizationModules(Organization $organization): array {
-        $cacheDriver = new ApcuCache();
-        //If the modules are all ready available inside the APCu cache
-        if($cacheDriver->contains('organization_modules_' . $organization->getId())){
-            return $cacheDriver->fetch('organization_modules_' . $organization->getId());
-        }
+//        $cacheDriver = new ApcuCache();
+//        //If the modules are all ready available inside the APCu cache
+//        if($cacheDriver->contains('organization_modules_' . $organization->getId())){
+//            return $cacheDriver->fetch('organization_modules_' . $organization->getId());
+//        }
 
         $modulesBySettings = $this->getModuleBySettings($organization);
 
@@ -56,8 +57,8 @@ class Module
 
         $organizationModules = array_merge_recursive($modulesForProduct, $modulesBySettings, $modulesByConditions);
 
-        //Keep the modules inside the APCu cache
-        $cacheDriver->save('organization_modules_' . $organization->getId(), $organizationModules, '86400');
+//        //Keep the modules inside the APCu cache
+//        $cacheDriver->save('organization_modules_' . $organization->getId(), $organizationModules, '86400');
 
         return $organizationModules;
     }