PHPackages                             saturio/opcache-manager - 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. saturio/opcache-manager

AbandonedSymfony-bundle[CLI &amp; Console](/categories/cli)

saturio/opcache-manager
=======================

Reset cache, show summary information and get configuration about de OPcache

0.5.0(5y ago)290MITPHPPHP &gt;=7.4

Since Feb 13Pushed 5y ago1 watchersCompare

[ Source](https://github.com/satur-io/OpcacheManagerBundle)[ Packagist](https://packagist.org/packages/saturio/opcache-manager)[ RSS](/packages/saturio-opcache-manager/feed)WikiDiscussions main Synced today

READMEChangelog (7)Dependencies (9)Versions (9)Used By (0)

The OPcacheManagerBundle
========================

[](#the-opcachemanagerbundle)

Manage your OPcache using CLI through API endpoints.

The OpcacheManagerBundle a simple and fast way to manage your cache using CLI commands and the most useful package for your CI/CD scripts.

How it works
------------

[](#how-it-works)

### The issue

[](#the-issue)

[OPcache](https://www.php.net/manual/es/book.opcache.php) doesn't provide any method to clean your application cache using a CLI. So, if you want to clean your symfony app cache, you must run `opcache_reset()` function ***in your web server or your php-fpm process***. That is mean that you need a URL in your app that call the reset function.

Of course, you could use something like `php7.4-fpm reload` to refresh OPCache if the user you use for deployment has permissions.

This is a headache when we use CI/CD tools for the deployment, since we can't reset the cache launching a command.

### OpcacheManagerBundle solution

[](#opcachemanagerbundle-solution)

OpcacheManagerBundle provides some routes to manage your OPCache through symfony commands. These commands make signed requests to the routes and show results in console. For security reasons, the request must to be signed (the bundle manage this by itself), so it can't be use directly unless the `APP_SECRET` is known.

Instalation
-----------

[](#instalation)

```
composer require saturio/opcache-manager
```

Configuration
-------------

[](#configuration)

First of all, active the bundle in your `config/bundles.php` file:

```
// config/bundles.php
