/opcode-cli

A tool for interacting with php opcode cache (APC or OpCache) from command line.

Primary LanguagePHPMIT LicenseMIT

Opcode-Cli

Opcode-Cli is the command line tool for managing opcode cache.

It allows you:

  • invalidate web server opcode cache
  • get status information from command line

It can work both via fastcgi interface (no need to expose it under your web root) and via any other web server.

Installation

composer require alexey-kupershtokh/opcode-cli

Usage

Get opcode cache status:

php vendor/bin/opcode-cli.php --action=status
php vendor/bin/opcode-cli.php --action=status --port 9000
php vendor/bin/opcode-cli.php --action=status --sock=/var/run/php5-fpm.sock

Clear opcode cache:

php vendor/bin/opcode-cli.php --action=clear
php vendor/bin/opcode-cli.php --action=clear --port 9000
php vendor/bin/opcode-cli.php --action=clear --sock=/var/run/php5-fpm.sock

References