laravel / framework

The Laravel Framework.
https://laravel.com
MIT License
32.41k stars 10.99k forks source link

[Bug] Clear cache in queue #35897

Closed quevlu closed 3 years ago

quevlu commented 3 years ago

Description:

There is a bug when I try to flush a cache generated in an endpoint that it gives the information from the database and when I update this model (saving, deleting, updating, etc) and emit an event related to this action and associate a listener to it. It cleans the cache because I could see the boolean result of flush, but the cache is still alive.

Steps To Reproduce:

1- Define Apc driver in cache 2- Save anything in cache 3- Emit an event related to eloquent or whatever event 4- Create a listener related to event 5- Flush cache with the same key

quevlu commented 3 years ago

Apc in background (cli) is different than background