A CLI tool and library to manage APCu, OPcache, and file status cache via FastCGI, CLI, or HTTP.
CacheTool is a command-line utility and PHP library that enables direct interaction with PHP's caching systems (APCu, OPcache, and file status cache) from the terminal. It connects to PHP-FPM or other FastCGI servers to perform cache operations without requiring web endpoints or service restarts, solving problems like cache invalidation, debugging, and maintenance automation.
PHP developers and system administrators who need to manage PHP caches (APCu, OPcache, file status) in production, staging, or development environments, especially those using PHP-FPM or FastCGI servers.
Developers choose CacheTool because it provides a scriptable, CLI-based interface to clear, inspect, and manipulate PHP caches without restarting services or exposing web endpoints, offering flexibility with multiple adapters (FastCGI, CLI, HTTP) and support for automation via cron jobs or Docker containers.
CLI App and library to manage apc & opcache.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Connects directly to PHP-FPM sockets via the FastCGI adapter, enabling cache operations without web endpoints or service restarts, as shown in the --fcgi usage examples.
Provides extensive commands for APCu, OPcache, and file status cache, including clearing, statistics, key manipulation, and script compilation, detailed in the commands list.
Supports FastCGI, CLI, and HTTP adapters with configuration files, allowing use in diverse environments like chrooted setups or via Docker, per the README sections.
Designed for CLI and programmatic use with config files and Composer library integration, ideal for cron jobs and deployment scripts, as emphasized in the philosophy.
Clearing the file status cache only affects the responding FPM worker, not the entire pool, a noted restriction in the README that reduces effectiveness for some use cases.
Non-standard environments like chrooted FastCGI require additional flags (--fcgi-chroot, --tmp-dir) and careful configuration, increasing setup overhead and potential for errors.
Some HTTP adapter tests rely on sslip.io for DNS resolution, which can fail if not configured, adding friction for contributors or those running tests in restricted networks.