Laravel OPcache Package

Laravel OPcache Package

PHP, since version 5.5, comes bundled with OPcache which improves performance. Here is how PHP documentation explains it:

OPcache improves PHP performance by storing precompiled script bytecode in shared memory, thereby removing the need for PHP to load and parse scripts on each request.

One of the drawbacks to implementing OPcache is that you have to clear the cache every time you change any PHP code. Because of this, the team at Appstract has created a Laravel Artisan package that gives you quick and easy commands for OPcache. Here are a few usage examples:

Clear OPcache:

php artisan opcache:clear

Show OPcache config:

php artisan opcache:config

Show OPcache status:

php artisan opcache:status

Pre-compile your application code (experimental, test before you deploy):

php artisan opcache:optimize

To learn more about this package check out the GitHub Repository which includes all the instructions and everything you’ll need to get started.

Filed in: Laravel Packages / Artisan / OPcache
Laravel News Partners

Laravel Jobs

Senior Full-Stack Developer
Atlanta, GA - (remote) USA ONLY
Curricula
PHP Laravel Developer
London
Investoo
Senior Software Engineer
Boston, MA
ButcherBox
Senior Laravel Developer
London
Geomiq Ltd
Remote Full Stack Laravel / Vue Developer
Remote
EventForge LLC

Newsletter

Join 31,000+ others and never miss out on new tips, tutorials, and more.