PHPackages                             pollen/laravel-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. [CLI &amp; Console](/categories/cli)
4. /
5. pollen/laravel-opcache

ActiveLibrary[CLI &amp; Console](/categories/cli)

pollen/laravel-opcache
======================

PHP OPcache Artisan commands for Laravel.

16751PHP

Since Mar 5Pushed 2y agoCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel OPcache
===============

[](#laravel-opcache)

[![Latest Version on Packagist](https://camo.githubusercontent.com/85c295a9f057589e9fe5a3b5ffc5388c1eea60d1a4613944f62809b6ddff1d12/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f706f6c6c656e2f6c61726176656c2d6f7063616368652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/appstract/laravel-opcache)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/b2b09b70ab2853df2f856e9581c0a91375c3fb372d88ff383a907f376e03e6d0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f706f6c6c656e2f6c61726176656c2d6f7063616368652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/appstract/laravel-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/appstract/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 pollen/laravel-opcache
```

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

```
php artisan vendor:publish --provider="Pollen\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 Pollen\Opcache\OpcacheFacade as OPcache;

...

OPcache::clear();
```

Contributing
------------

[](#contributing)

Contributions are welcome, [thanks to y'all](https://github.com/AmphiBee/laravel-opcache/graphs/contributors) :)

About AmphiBee
--------------

[](#about-amphibee)

We're AmphiBee, a WordPress / WooCommerce agency

Credits
-------

[](#credits)

Original package by [Appstract](https://github.com/appstract/laravel-opcache)

License
-------

[](#license)

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

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity19

Early-stage or recently created project

 Bus Factor1

Top contributor holds 76.7% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/8435080f3e74b629258f291a62cb72aa9d63ee44d74e588f594dc6378c328fa2?d=identicon)[amphibee](/maintainers/amphibee)

---

Top Contributors

[![ovanschie](https://avatars.githubusercontent.com/u/3015449?v=4)](https://github.com/ovanschie "ovanschie (138 commits)")[![smecnarowski](https://avatars.githubusercontent.com/u/12491034?v=4)](https://github.com/smecnarowski "smecnarowski (6 commits)")[![thejhnz](https://avatars.githubusercontent.com/u/5363935?v=4)](https://github.com/thejhnz "thejhnz (4 commits)")[![gizburdt](https://avatars.githubusercontent.com/u/1470623?v=4)](https://github.com/gizburdt "gizburdt (4 commits)")[![ogorzalka](https://avatars.githubusercontent.com/u/149651?v=4)](https://github.com/ogorzalka "ogorzalka (4 commits)")[![teuunn](https://avatars.githubusercontent.com/u/17406280?v=4)](https://github.com/teuunn "teuunn (3 commits)")[![CaraWang](https://avatars.githubusercontent.com/u/4214689?v=4)](https://github.com/CaraWang "CaraWang (3 commits)")[![orkhanahmadov](https://avatars.githubusercontent.com/u/7041590?v=4)](https://github.com/orkhanahmadov "orkhanahmadov (3 commits)")[![The-Hasanov](https://avatars.githubusercontent.com/u/8019071?v=4)](https://github.com/The-Hasanov "The-Hasanov (2 commits)")[![jpuck](https://avatars.githubusercontent.com/u/15305396?v=4)](https://github.com/jpuck "jpuck (2 commits)")[![branchzero](https://avatars.githubusercontent.com/u/7685609?v=4)](https://github.com/branchzero "branchzero (2 commits)")[![Cyrille37](https://avatars.githubusercontent.com/u/368965?v=4)](https://github.com/Cyrille37 "Cyrille37 (2 commits)")[![drbyte](https://avatars.githubusercontent.com/u/404472?v=4)](https://github.com/drbyte "drbyte (1 commits)")[![lex111](https://avatars.githubusercontent.com/u/4408379?v=4)](https://github.com/lex111 "lex111 (1 commits)")[![michalisantoniou6](https://avatars.githubusercontent.com/u/4642044?v=4)](https://github.com/michalisantoniou6 "michalisantoniou6 (1 commits)")[![ctf0](https://avatars.githubusercontent.com/u/7388088?v=4)](https://github.com/ctf0 "ctf0 (1 commits)")[![palpalani](https://avatars.githubusercontent.com/u/716695?v=4)](https://github.com/palpalani "palpalani (1 commits)")[![sangnguyenplus](https://avatars.githubusercontent.com/u/6972407?v=4)](https://github.com/sangnguyenplus "sangnguyenplus (1 commits)")[![stevegrunwell](https://avatars.githubusercontent.com/u/233836?v=4)](https://github.com/stevegrunwell "stevegrunwell (1 commits)")

### Embed Badge

![Health badge](/badges/pollen-laravel-opcache/health.svg)

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

###  Alternatives

[wp-cli/wp-cli

WP-CLI framework

5.0k17.2M318](/packages/wp-cli-wp-cli)[consolidation/annotated-command

Initialize Symfony Console commands from annotated command class methods.

22569.8M18](/packages/consolidation-annotated-command)[chi-teck/drupal-code-generator

Drupal code generator

26947.8M5](/packages/chi-teck-drupal-code-generator)[seld/cli-prompt

Allows you to prompt for user input on the command line, and optionally hide the characters they type

24725.8M17](/packages/seld-cli-prompt)[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[php-tui/php-tui

Comprehensive TUI library heavily influenced by Ratatui

589747.0k6](/packages/php-tui-php-tui)

PHPackages © 2026

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