Browse Source

v8-2811 add a clear-cache after the creation of a new organization

Olivier Massot 3 years ago
parent
commit
e083052372
1 changed files with 5 additions and 0 deletions
  1. 5 0
      ot_admin/Classes/Controller/SiteController.php

+ 5 - 0
ot_admin/Classes/Controller/SiteController.php

@@ -603,6 +603,11 @@ class SiteController extends ActionController
                 throw new \RuntimeException('Something went wrong while committing the result');
             }
 
+            // Clear the whole cache, to avoid errors with the configuration files cache
+            //      >> this could probably be improved by targeting the caches to clean
+            //         more precisely, but that'll do for the moment
+            OtCacheManager::clearCache(false);
+
         } catch(\Throwable $e) {
             // rollback
             $this->connectionPool->getConnectionByName('Default')->rollback();