永久 保存数据
This commit is contained in:
parent
3a1e4d1fdd
commit
c71e41371b
@ -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);
|
||||
|
||||
/** 统计收益结束 */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user