This package is abandoned and no longer maintained. No replacement package was suggested.

Rollerworks Cache Component

v1.2.0 2015-12-05 12:56 UTC

This package is not auto-updated.

Last update: 2019-02-20 17:18:31 UTC


SensioLabsInsight Build Status

The Rollerworks Cache component provides a Session based cache-driver for Doctrine Common. (Cache data is stored in a session).


This Component uses Composer to manage its dependencies.

If you don't have Composer yet, download it following the instructions on or just run the following command:

curl -s | php

Then add the following to your composer.json file:

// composer.json
    // ...
    require: {
        // ...
        "rollerworks/cache": "~1.0"

Then, you can install the new dependencies by running Composer's update command from the directory where your composer.json file is located:

$ php composer.phar update rollerworks/cache

Now, Composer will automatically download all required files, and install them for you.

That's it! You can now use the Rollerworks Cache Component.


This component depends on the Symfony HttpFoundation Component and Doctrine Common. Usage is very simple.

use Symfony\Component\HttpFoundation\Session\Session;
use Rollerworks\Component\Cache\SessionCache;

$session = new Session();

// ...

// The first parameter of the SessionCache must be a `Symfony\Component\HttpFoundation\Session\Session` object.
// The second parameter is an optional session storageKey that used for storing the session, default is '_rollerworks_cache'.
// The third parameter is an optional SessionCacheBag object

// When a SessionCacheBag is provided, it must be registered at the session by calling registerBag() on the $session object.
$sessionCacheDriver = new SessionCache($session, '_my_cache');

// Now you can use the $sessionCacheDriver object for any Doctrine Caching.
// See the resources below for more information.


Doctrine Caching

This Component is released under MIT license.

You can run the unit tests with the following command: