Use Cache for varieties of cache server

This commit is contained in:
Colette Contreras
2020-01-08 01:34:48 +08:00
parent 4d66941ef6
commit 1ef8eab552
12 changed files with 41 additions and 41 deletions

View File

@ -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())