PHPackages                             beryllium/cachebundle - 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. beryllium/cachebundle

ActiveSymfony-bundle[Caching](/categories/caching)

beryllium/cachebundle
=====================

Provides an interface to Memcache for Symfony2 applications

v0.1.2(13y ago)32135.8k↓41.7%20[8 issues](https://github.com/beryllium/CacheBundle/issues)[3 PRs](https://github.com/beryllium/CacheBundle/pulls)MITPHPPHP &gt;=5.3.0

Since Jul 18Pushed 5y ago3 watchersCompare

[ Source](https://github.com/beryllium/CacheBundle)[ Packagist](https://packagist.org/packages/beryllium/cachebundle)[ RSS](/packages/beryllium-cachebundle/feed)WikiDiscussions master Synced 1mo ago

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

BerylliumCacheBundle for Symfony2
=================================

[](#berylliumcachebundle-for-symfony2)

It's memcache. You've seen it before. Now it's injectable to the DIC, and you don't have to write all this junk yourself. And it should also work with Amazon ElasticCache, as well as the MySQL Memcache Interface (new in MySQL 5.6).

Another advantage over just using a raw memcache object is that BCB probes servers before adding them to the pool - if a server is down, your site won't be gravely impacted by the Memcache class waiting and waiting and waiting for a response.

The groundwork is also laid out for building alternate cache interfaces quickly - such as APC caching, or your own home-rolled filesystem cache.

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

[](#configuration)

### Step 1: Fetching

[](#step-1-fetching)

If you are using composer, you probably only need to add this to your composer.json file:

```
"require": {
  "Beryllium/CacheBundle": "dev-master"
},

```

If you aren't using composer, add this to your deps file:

```
[BerylliumCacheBundle]
    git=http://github.com/beryllium/CacheBundle.git
    target=/bundles/Beryllium/CacheBundle

```

And then run the update vendors script:

```
bin/vendors install

```

### Step 2: Configure autoload.php

[](#step-2-configure-autoloadphp)

If you aren't using Composer, register the namespace like so:

```
# app/autoload.php
