appstract / laravel-opcache

Laravel Package for OPcache
MIT License
1.34k stars 119 forks source link

Why use http routes? #19

Closed jaketoolson closed 7 years ago

jaketoolson commented 7 years ago

Why do your artisan commands call http routes? It seems like an undesirable exposure to routes you wouldn't otherwise want available via http, even though you have middleware rules. Create a service or bus ?

mstaack commented 7 years ago

flushing opcache only works from a webserver like nginx/apache.. in php cli flushing opcache is not possible...

jaketoolson commented 7 years ago

Makes sense!

kohenkatz commented 7 years ago

There is actually a setting opcache.enable_cli that determines this. It was disabled by default before, but is now enabled by default as of PHP 7.1.2.

ovanschie commented 7 years ago

@kohenkatz that is not what it is for. CLI and FPM use separate instances of PHP both with it's own config and cache. http://php.net/manual/en/opcache.configuration.php#ini.opcache.enable-cli