PHPackages                             steve-moretz/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. [Caching](/categories/caching)
4. /
5. steve-moretz/laravel-opcache

ActivePackage[Caching](/categories/caching)

steve-moretz/laravel-opcache
============================

This package allows you to clear OPcache from CLI.

1.0.3(4y ago)010MITPHPPHP &gt;=5.5.9

Since Sep 7Pushed 4y agoCompare

[ Source](https://github.com/Stevemoretz/laravel-opcache)[ Packagist](https://packagist.org/packages/steve-moretz/laravel-opcache)[ RSS](/packages/steve-moretz-laravel-opcache/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (15)Used By (0)

Clear OPcache with ease
=======================

[](#clear-opcache-with-ease)

This Laravel package allows you to clear OPcache, solving a common problem related to cache invalidation during atomic deployments (also called "zero downtime deploy").

Getting Started
---------------

[](#getting-started)

These instructions allow you to install the package into an existing Laravel app.

### Installation

[](#installation)

You can install this package via Composer using:

```
composer require steve-moretz/laravel-opcache
```

### Config Website Url

[](#config-website-url)

```
php artisan vendor:publish --provider="SteveMoretz\LaravelOpcacheClear\OpcacheClearServiceProvider"
```

Now you can go ahead and change the website url if necessary.

Usage
-----

[](#usage)

### Clear

[](#clear)

```
php artisan opcache:clear
```

### Watch Invalidate Cache

[](#watch-invalidate-cache)

1. First you need to install

```
yarn add chokidar
```

2. Now can goto `config/opcache.php` and set watch\_globs to list of directories and files you want to watch.

eg :

```
    "watch_globs" => [__DIR__ . "/../../**/*.php"]

```

3. Now you can run

```
php artisan opcache:watch
```

### Suggestion

[](#suggestion)

Run this command during deployment process in order to automate the cleaning process before you app became active!

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 57.1% 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 ~153 days

Recently: every ~497 days

Total

14

Last Release

1546d ago

Major Versions

0.0.10 → 1.0.02022-02-16

PHP version history (2 changes)0.0.1PHP ^7.0

1.0.0PHP &gt;=5.5.9

### Community

Maintainers

![](https://www.gravatar.com/avatar/4d558b19d46728340279509118d25ebbd92115e4048f541c00c3f9f62672f1e0?d=identicon)[Stevemoretz](/maintainers/Stevemoretz)

---

Top Contributors

[![michelecurletta](https://avatars.githubusercontent.com/u/65455871?v=4)](https://github.com/michelecurletta "michelecurletta (20 commits)")[![Stevemoretz](https://avatars.githubusercontent.com/u/27680142?v=4)](https://github.com/Stevemoretz "Stevemoretz (14 commits)")[![ekateiva](https://avatars.githubusercontent.com/u/12799259?v=4)](https://github.com/ekateiva "ekateiva (1 commits)")

---

Tags

laravelcacheOpcacheresetclear

### Embed Badge

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

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

###  Alternatives

[swayok/alternative-laravel-cache

Replacements for Laravel's redis and file cache stores that properly implement tagging idea. Powered by cache pool implementations provided by http://www.php-cache.com/

202541.1k6](/packages/swayok-alternative-laravel-cache)[arifhp86/laravel-clear-expired-cache-file

Remove laravel expired cache file/folder

36128.7k](/packages/arifhp86-laravel-clear-expired-cache-file)[elcobvg/laravel-opcache

Custom OPcache Cache Driver for Laravel. Faster than Redis or memcached.

43317.1k1](/packages/elcobvg-laravel-opcache)[byerikas/cache-tags

Allows for Redis/Valkey cache flushing multiple tagged items by a single tag.

1413.9k](/packages/byerikas-cache-tags)[salehhashemi/laravel-configurable-cache

Configurable Laravel cache manager

2114.5k1](/packages/salehhashemi-laravel-configurable-cache)

PHPackages © 2026

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