PHPackages                             marcha/lumen-opcache - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. marcha/lumen-opcache

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

marcha/lumen-opcache
====================

PHP OPcache Artisan commands for Laravel and Lumen.

1.0.0(5y ago)1156[1 issues](https://github.com/marcha/lumen-opcache/issues)MITPHPPHP &gt;=7.3

Since Dec 19Pushed 5y ago1 watchersCompare

[ Source](https://github.com/marcha/lumen-opcache)[ Packagist](https://packagist.org/packages/marcha/lumen-opcache)[ Docs](https://github.com/marcha/lumen-opcache)[ RSS](/packages/marcha-lumen-opcache/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (7)Versions (4)Used By (0)

Lumen OPcache
=============

[](#lumen-opcache)

[![Latest Version on Packagist](https://camo.githubusercontent.com/b9a273ae8e9ae5a629a6c3b32fef5c693a0f3766c0d6a5d3cf22f33d9dca4602/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d61726368612f6c756d656e2d6f7063616368652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/Marcha/lumen-opcache)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/64b97235dac19d5c9cc0b31bdc62d102feda99442208fe204f6816a7170f334a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d61726368612f6c756d656e2d6f7063616368652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/Marcha/lumen-opcache)

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 application, [read the article on Medium](https://medium.com/Marcha/make-your-laravel-app-fly-with-php-opcache-9948db2a5f93#.bjrpj4h1c).

[](#if-you-want-to-learn-more-about-opcache-and-what-it-can-do-for-your-laravel-application-read-the-article-on-medium)

Requirements
------------

[](#requirements)

This package requires Laravel 7 or newer.

Installation
------------

[](#installation)

You can install the package via Composer:

```
composer require Marcha/laravel-opcache
```

Add the following line in your `bootstrap/app.php` file to register the provider:

```
$app->register(Marcha\Opcache\OpcacheServiceProvider::class);
```

If you need to change config values, you can publish the config file with:

```
php artisan vendor:publish --provider="Marcha\Opcache\OpcacheServiceProvider" --tag="config"
```

Make sure your APP\_URL is set correctly in .env.

If you want to set a different url to call the OPcache routes (for use with a load balancer for example), you can set OPCACHE\_URL.

Usage
-----

[](#usage)

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:

```
php artisan opcache:compile {--force}
```

Note: `opcache.dups_fix `must be enabled, or use the `--force` flag. If you run into "Cannot redeclare class" errors, enable `opcache.dups_fix` or add the class path to the exclude list.

Programmatic usage:

```
use Marcha\Opcache\OpcacheFacade as OPcache;

...

OPcache::clear();
```

Credits
-------

[](#credits)

This package was originally forked from [appstract/laravel-opcache](https://github.com/appstract/laravel-opcache).

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

1967d ago

Major Versions

0.1.1 → 1.0.02020-12-19

### Community

Maintainers

![](https://www.gravatar.com/avatar/b28acee7c882f6750786ee19a357ae7fb652f50d583d5e8adaee65e336f73717?d=identicon)[marcha](/maintainers/marcha)

---

Top Contributors

[![marcha](https://avatars.githubusercontent.com/u/3828422?v=4)](https://github.com/marcha "marcha (4 commits)")

---

Tags

phplaravellumenOpcachemarcha

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/marcha-lumen-opcache/health.svg)

```
[![Health](https://phpackages.com/badges/marcha-lumen-opcache/health.svg)](https://phpackages.com/packages/marcha-lumen-opcache)
```

###  Alternatives

[stevebauman/location

Retrieve a user's location by their IP Address

1.3k7.6M65](/packages/stevebauman-location)[appstract/laravel-opcache

PHP OPcache Artisan commands for Laravel.

1.4k4.9M7](/packages/appstract-laravel-opcache)[kra8/laravel-snowflake

Snowflake for Laravel and Lumen.

188402.3k6](/packages/kra8-laravel-snowflake)[monicahq/laravel-cloudflare

Add Cloudflare ip addresses to trusted proxies for Laravel.

3372.7M4](/packages/monicahq-laravel-cloudflare)[laragear/preload

Effortlessly make a Preload script for your Laravel application.

119363.5k](/packages/laragear-preload)[tehwave/laravel-achievements

Simple, elegant Achievements the Laravel way

7012.8k](/packages/tehwave-laravel-achievements)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
