فهرست منبع

make cache cleaning more precise

Olivier Massot 4 سال پیش
والد
کامیت
de72b4207a
1فایلهای تغییر یافته به همراه5 افزوده شده و 7 حذف شده
  1. 5 7
      ot_admin/Classes/Controller/SiteController.php

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

@@ -715,16 +715,15 @@ class SiteController extends ActionController
                 throw new \RuntimeException('Something went wrong while committing the result');
             }
 
+            // ## Clear the Typo3 cache for the website
+            OtCacheManager::clearSiteCache($rootUid, true);
+
         } catch(\Throwable $e) {
             // rollback
             $this->connectionPool->getConnectionByName('Default')->rollback();
             throw $e;
         }
 
-        // ## Clear the Typo3 cache for the website
-        OtCacheManager::clearAllCache();
-//        OtCacheManager::clearSiteCache($rootUid, true);
-
         return $rootUid;
     }
 
@@ -1157,8 +1156,7 @@ class SiteController extends ActionController
     {
         $rootUid = $this->otWebsiteRepository->findRootUidForOrganization($organizationId);
 
-        OtCacheManager::clearAllCache();
-//        OtCacheManager::clearSiteCache($rootUid, $clearAll);
+        OtCacheManager::clearSiteCache($rootUid, $clearAll);
 
         return $rootUid;
     }
@@ -1372,7 +1370,7 @@ class SiteController extends ActionController
             $this->addRedirection($originDomain, $newDomain);
         }
 
-        OtCacheManager::clearAllCache();
+        OtCacheManager::clearSiteCache($rootUid, true);
         return $rootUid;
     }