|
|
@@ -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;
|
|
|
}
|