cvepdb / laravel-opcache-clear
This Laravel package allows you to clear the OPcache of a PHP application running in FPM mode with ease.
This package's canonical repository appears to be gone and the package has been frozen as a result. Email us for help if needed.
Package info
github.com/abenevaut/laravel-opcache-clear
Type:package
pkg:composer/cvepdb/laravel-opcache-clear
Requires
- php: >=5.5.9
- guzzlehttp/guzzle: ^6.0
Requires (Dev)
- laravel/framework: 5.4.*
- phpunit/phpunit: 6.0.*
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Clear OPcache with ease
This Laravel 5 package allows you to clear OPcache, solving a common problem related to cache invalidation during atomic deployments (also called "zero downtime deploy").
Getting Started
These instructions allows you to install the package into an existing Laravel app.
Prerequisities
Laravel 5.4 up&running installation.
Installation
You can install this package via Composer using:
composer require abenevaut/laravel-opcache-clear
You must also install this service provider.
// config/app.php 'providers' => [ ... ABENEVAUT\Opcache\Clear\App\Providers\OpcacheClearServiceProvider::class, ... ];
You must make sure that you've setted the right application url into config/app.php
// config/app.php 'url' => env('APP_URL', 'http://my-app-url'),
Usage
Once you have installed the package, you can run the following command:
php artisan opcache:clear
All done! Your OPcache is resetted!
Suggestion
Run this command during deployment process in order to automate the cleaning process before you app become active!
Credits to main author
Original package : michelecurletta/laravel-opcache-clear