PHPackages                             werkint/redis-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. werkint/redis-bundle

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

werkint/redis-bundle
====================

Bundle providing Redis (namespaced) for services via tags

v0.0.1(11y ago)1139GPL-3.0+PHPPHP &gt;=5.5

Since Aug 23Pushed 10y ago1 watchersCompare

[ Source](https://github.com/Werkint/RedisBundle)[ Packagist](https://packagist.org/packages/werkint/redis-bundle)[ RSS](/packages/werkint-redis-bundle/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

RedisBundle
===========

[](#redisbundle)

Bundle providing Redis (namespaced) for services via tags
=========================================================

[](#bundle-providing-redis-namespaced-for-services-via-tags)

This bundle allows separation of services with namespaces. You tag each service which use Memcached, so when the container is being compiled, each service get an instance of doctrine cache provider with corresponding namespace set. Also this bundle helps store sessions in namespaces.

Also notice, that full namespace for services would be something like "company\_dev\_theservice\_", so you even can have multiple instances of project running on the machine at the same time.

### Configuration

[](#configuration)

```
framework:
    ...
    session:
        handler_id: werkint.redis.session
werkint_redis:
    host:   localhost
    port:   11211
    prefix: company_%kernel.environment%
    session:
        prefix: company_%kernel.environment%_sess
        expire: 3600
        provider: redis ; or apc
```

### Adding tagged services (namespace: "theservice")

[](#adding-tagged-services-namespace-theservice)

```
services:
    company.service:
        class: Company\MainBundle\Service\Fooservice
        arguments:
            ...
            - @werkint.redis.ns.theservice
        tags:
            - { name: werkint.redis.cache, scope: project, ns: foo  }

```

```
