mirror of
https://github.com/v2board/v2board.git
synced 2025-06-12 20:47:56 +08:00
Use Cache for varieties of cache server
This commit is contained in:
@ -8,7 +8,7 @@ use App\Models\Order;
|
||||
use App\Models\Server;
|
||||
use App\Models\ServerLog;
|
||||
use App\Utils\Helper;
|
||||
use Illuminate\Support\Facades\Redis;
|
||||
use Cache;
|
||||
|
||||
class V2boardCache extends Command
|
||||
{
|
||||
@ -48,7 +48,7 @@ class V2boardCache extends Command
|
||||
}
|
||||
|
||||
private function setMonthIncome() {
|
||||
Redis::set(
|
||||
Cache::put(
|
||||
'month_income',
|
||||
Order::where('created_at', '>=', strtotime(date('Y-m-1')))
|
||||
->where('created_at', '<', time())
|
||||
@ -58,7 +58,7 @@ class V2boardCache extends Command
|
||||
}
|
||||
|
||||
private function setMonthRegisterTotal() {
|
||||
Redis::set(
|
||||
Cache::put(
|
||||
'month_register_total',
|
||||
User::where('created_at', '>=', strtotime(date('Y-m-1')))
|
||||
->where('created_at', '<', time())
|
||||
|
Reference in New Issue
Block a user