|
@@ -155,7 +155,21 @@ class SiteCache
|
|
*/
|
|
*/
|
|
public static function clearSpecificTypeCache(string $domain, string $type): void
|
|
public static function clearSpecificTypeCache(string $domain, string $type): void
|
|
{
|
|
{
|
|
- Cache::tags([$domain, $type])->flush(); // 清除该域名下特定类型的缓存
|
|
|
|
|
|
+ //找出域名下的所有域名后再清除缓存
|
|
|
|
+
|
|
|
|
+ if(!empty($domain)) {
|
|
|
|
+
|
|
|
|
+ $dist= DistAdminDistributor::findByDomain($domain);
|
|
|
|
+
|
|
|
|
+ if($dist?->secondary_domain) {
|
|
|
|
+ Cache::tags([$dist?->secondary_domain, $type])->flush(); // 清除该域名下特定类型的缓存
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if($dist?->custom_domain) {
|
|
|
|
+ Cache::tags([$dist?->custom_domain, $type])->flush(); // 清除该域名下特定类型的缓存
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|