PHPackages                             snowcap/cache-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. snowcap/cache-bundle

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

snowcap/cache-bundle
====================

Symfony SnowcapCacheBundle

2.2.x-dev(13y ago)0577MITPHPPHP &gt;=5.3.2

Since Jan 22Pushed 12y ago1 watchersCompare

[ Source](https://github.com/snowcap/SnowcapCacheBundle)[ Packagist](https://packagist.org/packages/snowcap/cache-bundle)[ Docs](https://github.com/snowcap/SnowcapCacheBundle)[ RSS](/packages/snowcap-cache-bundle/feed)WikiDiscussions master Synced 1mo ago

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

Introduction
============

[](#introduction)

This bundle is used to provide access to cache drivers.

This is a work in progress with two drivers: Memcached and APC.

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

[](#installation)

1. Add this bundle to your `vendor/` dir:

    Add the following line in your `composer.json` file:

    ```
     "snowcap/cache-bundle": "dev-master",

    ```

    Run composer:

    ```
     composer update snowcap/cache-bundle

    ```
2. Add this bundle to your application's kernel:

    ```
     // app/ApplicationKernel.php
     public function registerBundles()
     {
         return array(
             // ...
             new Snowcap\CacheBundle\SnowcapCacheBundle(),
             // ...
         );
     }

    ```
3. Add the configuration in your config.yml file

    ```
     snowcap_cache:
         namespace: yournamspace
         caches:
             tweets:
                 type: memcached
                 options:
                     server: localhost
                     port: 11211
                     ttl: 86400
             flickr:
                 type: memcached
                 options:
                     server: localhost
                     port: 11211
                     ttl: 45632

    ```

Usage
-----

[](#usage)

```
    $cacheManager = $this->get('snowcap_cache.manager');

    $cache = $cacheManager->getCache('tweets');

    if ($cache->isEnabled()) {
        if (false === $tweets = $cache->get('tweets')) {
            $tweets = $this->getTweets();
            $cache->set('tweets', $tweets);
        }
    } else {
        $tweets = $this->getTweets();
    }

```

Running the tests
-----------------

[](#running-the-tests)

Before running the tests, you will need to install the bundle dependencies. Do it using composer :

```
curl -s http://getcomposer.org/installer | php
php composer.phar --dev install

```

Then you can simply launch phpunit

```
phpunit

```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% 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 ~114 days

Total

2

Last Release

4749d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/658424?v=4)[Snowcap](/maintainers/Snowcap)[@snowcap](https://github.com/snowcap)

---

Top Contributors

[![jmsche](https://avatars.githubusercontent.com/u/3929498?v=4)](https://github.com/jmsche "jmsche (2 commits)")[![pvanliefland](https://avatars.githubusercontent.com/u/690667?v=4)](https://github.com/pvanliefland "pvanliefland (1 commits)")

---

Tags

cache

### Embed Badge

![Health badge](/badges/snowcap-cache-bundle/health.svg)

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

###  Alternatives

[beryllium/cachebundle

Provides an interface to Memcache for Symfony2 applications

32135.8k](/packages/beryllium-cachebundle)[tbbc/cache-bundle

Symfony Bundle - Cache abstraction and method annotations for controlling cache

3613.1k](/packages/tbbc-cache-bundle)

PHPackages © 2026

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