PHPackages                             gordalina/cachetool-bundle - 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. gordalina/cachetool-bundle

AbandonedArchivedLibrary[Caching](/categories/caching)

gordalina/cachetool-bundle
==========================

CacheTool Symfony2 Bundle

1.7.0(11y ago)1879.5k4[2 issues](https://github.com/gordalina/CacheToolBundle/issues)[1 PRs](https://github.com/gordalina/CacheToolBundle/pulls)MITPHP

Since Sep 23Pushed 9y ago3 watchersCompare

[ Source](https://github.com/gordalina/CacheToolBundle)[ Packagist](https://packagist.org/packages/gordalina/cachetool-bundle)[ RSS](/packages/gordalina-cachetool-bundle/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (9)Used By (0)

CacheToolBundle
===============

[](#cachetoolbundle)

This bundle allows you to integrate [CacheTool](https://github.com/gordalina/cachetool) with Symfony2.

Installation
------------

[](#installation)

```
{
    "require": {
        "gordalina/cachetool-bundle": "~1.0"
    }
}
```

Register the bundle in `app/Appkernel.php`:

```
// app/AppKernel.php

public function registerBundles()
{
    return array(
        // ...
        new CacheTool\Bundle\CacheToolBundle(),
    );
}
```

Enable the bundle's configuration in `app/config/config.yml`:

```
# app/config/config.yml
cache_tool: ~
```

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

[](#configuration)

There are two adapters

1. CLI

```
# app/config/config.yml
cache_tool:
    adapter: cli
```

2. FastCGI

```
# app/config/config.yml
cache_tool:
    adapter: fastcgi
    fastcgi: 127.0.0.1:900
```

You can also connect by socket replacing the above by: `/var/run/php5-fpm.sock`.

If you don’t need apc or opcache you can disable it by setting it to false:

```
# app/config/config.yml
cache_tool:
    apc: false
```

```
# app/config/config.yml
cache_tool:
    opcache: false
```

Usage
-----

[](#usage)

### Commands

[](#commands)

```
  cachetool:apc:bin:dump                   Get a binary dump of files and user variables
  cachetool:apc:bin:load                   Load a binary dump into the APC file and user variables
  cachetool:apc:cache:info                 Shows APC user & system cache information
  cachetool:apc:cache:info:file            Shows APC file cache information
  cachetool:apc:key:delete                 Deletes an APC key
  cachetool:apc:key:exists                 Checks if an APC key exists
  cachetool:apc:key:fetch                  Shows the content of an APC key
  cachetool:apc:key:store                  Store an APC key with given value
  cachetool:apc:sma:info                   Show APC shared memory allocation information
  cachetool:cache:clear:dump               Clears APC cache (user, system or all)
  cachetool:opcache:configuration          Get configuration information about the cache
  cachetool:opcache:reset                  Resets the contents of the opcode cache
  cachetool:opcache:status                 Show summary information about the opcode cache
  cachetool:opcache:status:scripts         Show scripts in the opcode cache
```

### Service

[](#service)

You can access all `apc` and `opcode` functions through the `cachetool` service.

```
$cache = $container->get('cachetool');
$cache->apc_clear_cache('both');
// or
$cache->opcache_reset();
```

### Extending CacheTool

[](#extending-cachetool)

CacheTool depends on `Proxies` to provide functionality, by default when creating a CacheTool instance from the factory all proxies are enabled [`ApcProxy`](https://github.com/gordalina/cachetool/blob/master/src/CacheTool/Proxy/ApcProxy.php), [`OpcacheProxy`](https://github.com/gordalina/cachetool/blob/master/src/CacheTool/Proxy/OpcacheProxy.php) and [`PhpProxy`](https://github.com/gordalina/cachetool/blob/master/src/CacheTool/Proxy/PhpProxy.php), you can customize it or extend to your will like the example below:

```
use CacheTool\Adapter\FastCGI;
use CacheTool\CacheTool;
use CacheTool\Proxy;

$adapter = new FastCGI('/var/run/php5-fpm.sock');
$cache = new CacheTool();
$cache->setAdapter($adapter);
$cache->addProxy(new Proxy\ApcProxy());
$cache->addProxy(new Proxy\PhpProxy());
```

You can read more information at [CacheTool](https://github.com/gordalina/cachetool)'s page.

License
-------

[](#license)

This bundle is released under the MIT license. [See the complete license in the bundle.](https://github.com/gordalina/CacheToolBundle/blob/master/LICENSE)

###  Health Score

37

—

LowBetter than 84% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 75% 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 ~20 days

Recently: every ~35 days

Total

8

Last Release

4058d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3997a8664adb54d73be1861f2c2a562024cdd80dbde7eec9578f38fb8be1bb44?d=identicon)[gordalina](/maintainers/gordalina)

---

Top Contributors

[![gordalina](https://avatars.githubusercontent.com/u/787913?v=4)](https://github.com/gordalina "gordalina (18 commits)")[![hacfi](https://avatars.githubusercontent.com/u/428841?v=4)](https://github.com/hacfi "hacfi (6 commits)")

---

Tags

bundleSymfony2cacheapcOpcache

### Embed Badge

![Health badge](/badges/gordalina-cachetool-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/gordalina-cachetool-bundle/health.svg)](https://phpackages.com/packages/gordalina-cachetool-bundle)
```

###  Alternatives

[ihor/cachalot

Cache a lot in a proper way (APC, XCache, Memcached, Redis, Couchbase)

2928.0k](/packages/ihor-cachalot)[avtonom/semaphore-bundle

A generic locking Symfony bundle for PHP, that uses named locks for semaphore acquire and release, to guarantee atomicity

122.8k](/packages/avtonom-semaphore-bundle)

PHPackages © 2026

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