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

Merge branch 'development' into 'master'

Development

See merge request !1518
parents 80bf5b14 1a94a3e8
No related branches found
No related tags found
1 merge request!1518Development
......@@ -15,7 +15,7 @@ REDIS_RESULT_CONNECTION=default
REDIS_RESULT_CACHE_DURATION=60
BROADCAST_DRIVER=log
CACHE_DRIVER=database
CACHE_DRIVER=redis
SESSION_DRIVER=file
QUEUE_CONNECTION=sync
......
<?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
{
$schedule->command('requests:gather')->everyFifteenMinutes();
$schedule->command('requests:useragents')->everyFiveMinutes();
$schedule->command('cache:gc')->hourly();
$schedule->call(function () {
DB::table('monthlyrequests')->truncate();
......
......@@ -69,8 +69,8 @@ return [
],
'redis' => [
'driver' => 'redis',
'connection' => 'default',
'driver' => env('REDIS_CACHE_DRIVER', 'redis'),
'connection' => 'cache',
],
],
......
......@@ -118,6 +118,13 @@ return [
'port' => env('REDIS_PORT', 6379),
'database' => 0,
],
'cache' => [
'host' => env('REDIS_CACHE_HOST', 'localhost'),
'password' => env('REDIS_CACHE_PASSWORD', null),
'port' => env('REDIS_CACHE_PORT', 6379),
'database' => 0,
],
],
];
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