Browse Source

site update : get cache cleaning out of transaction

Olivier Massot 1 năm trước cách đây
mục cha
commit
129361a7f2
1 tập tin đã thay đổi với 3 bổ sung4 xóa
  1. 3 4
      ot_admin/Classes/Controller/SiteController.php

+ 3 - 4
ot_admin/Classes/Controller/SiteController.php

@@ -741,16 +741,15 @@ class SiteController extends ActionController
             if (!$commitSuccess) {
                 throw new RuntimeException('Something went wrong while committing the result');
             }
-
-            // ## Clear the Typo3 cache for the website
-            $this->otCacheManager->clearSiteCache($rootUid, true);
-
         } catch(\Throwable $e) {
             // rollback
             $this->connectionPool->getConnectionByName('Default')->rollback();
             throw $e;
         }
 
+        // ## Clear the Typo3 cache for the website
+        $this->otCacheManager->clearSiteCache($rootUid, true);
+
         return $rootUid;
     }