Skip to content
Snippets Groups Projects
Commit b02d474a authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

removed cache gc since redis cleans up itself

parent 7b8f3d61
No related branches found
No related tags found
2 merge requests!1518Development,!1517Resolve "Use Redis as Cache backend"
<?php
namespace App\Console\Commands;
use DB;
use Illuminate\Console\Command;
class CacheGC extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'cache:gc';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Cleans up every expired cache File';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
DB::delete('delete from cache where cache.expiration < unix_timestamp()');
}
}
...@@ -27,7 +27,6 @@ class Kernel extends ConsoleKernel ...@@ -27,7 +27,6 @@ class Kernel extends ConsoleKernel
{ {
$schedule->command('requests:gather')->everyFifteenMinutes(); $schedule->command('requests:gather')->everyFifteenMinutes();
$schedule->command('requests:useragents')->everyFiveMinutes(); $schedule->command('requests:useragents')->everyFiveMinutes();
$schedule->command('cache:gc')->hourly();
$schedule->call(function () { $schedule->call(function () {
DB::table('monthlyrequests')->truncate(); DB::table('monthlyrequests')->truncate();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment