瀏覽代碼

site update : get cache cleaning out of transaction

Olivier Massot 1 年之前
父節點
當前提交
129361a7f2
共有 1 個文件被更改,包括 3 次插入4 次删除
  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;
     }