Download the PHP package islenbo/cachetool without Composer

On this page you can find all versions of the php package islenbo/cachetool. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package cachetool

CacheTool - Manage cache in the CLI

Build Status Coverage Status

CacheTool allows you to work with APCu, OPcache, and the file status cache through the CLI. It will connect to a FastCGI server (like PHP-FPM) and operate on its cache.

Why is this useful?

Note that, unlike APCu and Opcache, the file status cache is per-process rather than stored in shared memory. This means that running stat:clear against PHP-FPM will only affect whichever FPM worker responds to the request, not the whole pool. Julien Pauli has written a post with more details on how the file status cache operates.

Compatibility

Installation - Latest version

You can alternatively download a compressed phar by using the URLs below.

Installation - old versions

Use tag name in the binary file name. E.g to download cachetool 3.2.2 which is compatible with PHP >=5.5.9 use: cachetool-3.2.2.phar

Usage

CacheTool requires an adapter to connect to, it can be cli, fcgi, and web. The fcgi adapter is the most common, as it connects directly to php-fpm.

You can pass an IP address or a unix socket to the --fcgi adapter, or leave it blank and CacheTool will try to find the php-fpm socket for you. If it can't find it, it will default to 127.0.0.1:9000.

You have some useful commands that you can use

Usage via Docker

The great folks at @sbitio, namely @NITEMAN and @jonhattan wrote a docker image that you can invoke to run CacheTool. The images are hosted in https://hub.docker.com/r/sbitio/cachetool

This is an example run with the web adapter:

Read more on their project page: https://github.com/sbitio/docker-cachetool

Configuration File

You can have a configuration file with the adapter configuration, allowing you to call CacheTool without --fcgi, --cli, or --web option.

You can pass a --config <file> option to the application or it will choose to load a file automaically.

The file must be named .cachetool.yml or .cachetool.yaml. CacheTool will look for this file on the current directory and in any parent directory until it finds one. If the paths above fail it will try to load /etc/cachetool.yml or /etc/cachetool.yaml configuration file.

An example of what this file might look like is:

Will connect to fastcgi at 127.0.0.1:9000

Will connect to cli (disregarding fastcgi configuration)

CacheTool writes files to the system temporary directory (given by sys_get_temp_dir()) but if you want to change this, for example, if your fastcgi service is run with PrivateTemp you can set it on the config file:

Example for the web adapter:

You can define the supported extensions in the config file. By default, apcu, and opcache are enabled. To disable apcu, add this to your config file:

Usage (as a library)

Add it as a dependency

If you want to use it in a Symfony 2.x project, require the 1.x version

Create instance

You can use apcu and opcache functions

Proxies

CacheTool depends on Proxies to provide functionality, by default when creating a CacheTool instance from the factory all proxies are enabled ApcuProxy, OpcacheProxy and PhpProxy, you can customize it or extend to your will like the example below:

Updating CacheTool

Running php cachetool.phar self-update will update a phar install with the latest version.

Testing

After running composer install, run ./vendor/bin/phpunit

Troubleshooting

[RuntimeException] Error: Unable to open primary script: /dev/shm/cachetool-584743c678dbb.php (No such file or directory) Status: 404 Not Found Content-type: text/html; charset=UTF-8 No input file specified.

This means that cachetool could not write to /dev/shm provide a directory that cachetool can write to through php cachetool.phar --tmp-dir=/writable/dir or configuration. This directory should also be readable by the web user running php-fpm/apache.

SELinux

To have cachetool working with SELinux read this comment by @driskell.

License

CacheTool is licensed under the MIT License - see the LICENSE for details


All versions of cachetool with dependencies

PHP Build Version
Package Version
Requires hollodotme/fast-cgi-client Version ^3.0
monolog/monolog Version ^1.0|^2.0
php Version ^7.3|^8.0
psr/container Version 1.0.0
psr/log Version ^1.0
symfony/console Version ^4.0|^5.0
symfony/dependency-injection Version ^4.0|^5.0
symfony/finder Version ^4.0|^5.0
symfony/process Version ^4.0|^5.0
symfony/yaml Version ^4.0|^5.0
symfony/http-client Version ^4.0|^5.0
symfony/http-foundation Version ^4.0|^5.0
consolidation/self-update Version ^1.2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package islenbo/cachetool contains the following files

Loading the files please wait ...