Hello, I'm using a simple event listener to detect when a notification is sent using a particular channel. In my case is NotificationChannels\Twilio\TwilioChannel.
Sometimes when I update this file, and upload to server, it seems that the update is not working... So I'm thinking if this is some cache in play... Any ideas?
... during your deployment process, you should run the event:cache Artisan command to cache a manifest of all of your application's events and listeners
So yes event & listeners are cached. Clear your cache on deployment and if you are using queue's, restart them on deploy.
Event Discovery is available for Laravel 5.8.9 or later.
And under Event Discovery is what you quote:
... during your deployment process, you should run the event:cache Artisan command to cache a manifest of all of your application's events and listeners
But I think this is only for Event Discovery (automatic event discovery) and not for manually registered events (as I use)
Do you have a queue running? If so, you need to restart the queue worker when you "change the file" otherwise your queue is working with the old file.
How do you change the file on the server? Because your server could have something like Opcache which caches the php files itself. Try restarting php-fpm after a deployment.