From c71e41371b3585dde2368398ddc88bdd106927ca Mon Sep 17 00:00:00 2001 From: "iVampireSP.com" Date: Mon, 12 Dec 2022 11:55:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B0=B8=E4=B9=85=20=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Models/Host.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/Models/Host.php b/app/Models/Host.php index 52d9bfc..5da99b7 100644 --- a/app/Models/Host.php +++ b/app/Models/Host.php @@ -68,11 +68,10 @@ * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|Host whereUpdatedAt($value) * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|Host whereUserId($value) * @method static \GeneaLabs\LaravelModelCaching\CachedBuilder|Host withCacheCooldownSeconds(?int $seconds = null) - * @mixin \Eloquent */ class Host extends Model { - use HasFactory, Cachable; + use Cachable; protected $table = 'hosts'; @@ -350,7 +349,7 @@ public function addLog(float|null $amount = 0): bool } // 保存 1 年 - Cache::put($cache_key, $earnings, 24 * 60 * 60 * 365); + Cache::forever($cache_key, $earnings); /** 统计收益结束 */