Browse Source

feat:helpers添加

igb 4 months ago
parent
commit
367918baaf
1 changed files with 5 additions and 1 deletions
  1. 5 1
      app/Helpers/SiteCache.php

+ 5 - 1
app/Helpers/SiteCache.php

@@ -21,9 +21,13 @@ class SiteCache
         }
 
         return Cache::tags([$domain, 'dist'])->remember("dist_{$domain}", $seconds, function () use ($domain) {
-            return DistAdminDistributor::where('custom_domain', $domain)
+            $dist= DistAdminDistributor::where('custom_domain', $domain)
                 ->orWhere('secondary_domain', $domain)
                 ->first();
+            //dd($dist);  // 调试缓存的数据
+            // 序列化存储
+            return serialize($dist);
+
         });
     }