This package contains some useful Artisan commands to work with PHP OPcache.
If you want to learn more about OPcache and what it can do for your Laravel app, you can read this article on Medium.
You can install the package via composer:
composer require appstract/laravel-opcache
Then register the service provider:
// config/app.php
'providers' => [
...
Appstract\Opcache\OpcacheServiceProvider::class,
];
Login to your server/vm and run one of the commands.
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
Programmatic usage:
use Appstract\Opcache\OpcacheFacade as OPcache;
...
OPcache::clear();
Contributions are welcome, thanks to y'all :)
Appstract is a small team from The Netherlands. <3 Laravel, Vue and other awesome tools.
Would be awesome if you would buy us a beer! Or a lot of beer :)
The MIT License (MIT). Please see License File for more information.