Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Jonjie's avatar
Level 12

optimize:clear VS config:clear command

Hello. I'm a bit confused with these 2 commands. I'm currently following the installation of spatie.

php artisan optimize:clear
# or
php artisan config:clear
0 likes
2 replies
SilenceBringer's avatar
Level 55

сonfig:clear command clears the configuration cache only, while optimize:clear comman clears the cache completely (application cache, routing cache, ... including the config cache)

SheldonCooper1's avatar

I have a Laravel monolith and I want to move some sections of the application into a Lumen microservice. However, to make the Lumen application work, I need a clone of the users table.

What is the best practice to do this? Should I create a an event listener that every time a user is created in Laravel will trigger an API call to create the same user in Lumen?

Please or to participate in this conversation.