pou/lumen-opcache-clear

This package allows you to clear OPcache when running PHP in FPM mode.
753
Install
composer require pou/lumen-opcache-clear
Latest Version:1.2.3
PHP:>=7.0
License:MIT
Last Updated:Sep 15, 2018
Links: GitHub  ·  Packagist
Maintainer: pou

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

Lumen 5 up&running installation. Registered Crypt alias.

Installation

You can install this package via Composer using:

composer require michelecurletta/laravel-opcache-clear

You must also install this service provider.

// config/app.php
'providers' => [
    ...
    MicheleCurletta\LaravelOpcacheClear\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!

Related Packages

neo/laravel-opcache

This Laravel package allows you to clear the OPcache of a PHP application runnin...

99 0
rlacerda83/lumem-elocache

Cache Eloquent querys for lumem

189 2
ytake/laravel-smarty

Smarty template engine for Laravel and Lumen

409,838 85
remic/guzzlecache

Laravel 5 package for caching Guzzle's GET requests.

9,258 17
codefocus/managedcache

Self-invalidating cache for Laravel

0 1