#### Laravel: Redis cache in background issue

I have a schedule task which runs every 5 minutes.

This schedule command puts some data to Redis cache via controller.

#### Kernel.php

...
protected $commands = [ CommandsDataCommand::class, ]; protected function schedule(Schedule$schedule)
{
$schedule->command('data:cache')->everyFiveMinutes()->onOneServer()->runInBackground(); }  #### DataCommand.php ... public function handle() { app('AppHttpControllersDataProcessing')->setCache(); }  #### DataProcessing.php ... public function setCache() {$data = ['one', 'two', 'three'];

This doesn’t work with runInBackground. When I am trying to get data from the cache it returns null anyway.
So, when I remove ->runInBackground() it works perfectly and then I can get data from Redis cache as expected.