39 lines
922 B
PHP
39 lines
922 B
PHP
<?php
|
|
|
|
namespace App\Console\Commands;
|
|
|
|
use Illuminate\Console\Command;
|
|
use App\Models\Artwork;
|
|
use App\Models\Episode;
|
|
use Illuminate\Support\Facades\DB;
|
|
|
|
class RefreshLeaderBoardCacheCommand extends Command
|
|
{
|
|
/**
|
|
* The name and signature of the console command.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $signature = 'naart:leaderboard-cache';
|
|
|
|
/**
|
|
* The console command description.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $description = 'Clears all leaderboard caches.';
|
|
|
|
/**
|
|
* Execute the console command.
|
|
*/
|
|
public function handle()
|
|
{
|
|
$this->line('Clearing Leaderboard Caches...');
|
|
cache()->forget('leaderboardTwelveMonths');
|
|
cache()->forget('leaderboardTwelveMonthsLanding');
|
|
cache()->forget('leaderboardAllTime');
|
|
cache()->forget('leaderboardRollingSixMonth');
|
|
cache()->forget('leaderboardNinetyDays');
|
|
}
|
|
}
|