2017 © Pedro Peláez
 

library memcached-bundle

Bundle providing Memcached (namespaced) for services via tags

image

werkint/memcached-bundle

Bundle providing Memcached (namespaced) for services via tags

  • Sunday, June 30, 2013
  • by nick4fake
  • Repository
  • 1 Watchers
  • 0 Stars
  • 44 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

MemcachedBundle

Bundle providing Memcached (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., (*1)

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., (*2)

Configuration

framework:
    ...
    session:
        handler_id: werkint.memcached.session
werkint_memcached:
    host:   localhost
    port:   11211
    prefix: company_%kernel.environment%
    session:
        prefix: company_%kernel.environment%_sess
        expire: 3600

Adding tagged services (namespace: "theservice")

services:
    company.service:
        class: Company\MainBundle\Service\Service
        arguments:
            ...
            - @werkint.memcached.ns.theservice
        tags:
            - { name: werkint.memcached.cacher, ns: theservice }
<?php
namespace Company\MainBundle\Service;

use Doctrine\Common\Cache\CacheProvider;

class Service
{
    protected $cacher;

    public function __construct(
        CacheProvider $cacher
    ) {
        $this->cacher = $cacher;
    }

    // You now can use doctrine cache provider as usual

}

The Versions

30/06 2013

dev-master

9999999-dev

Bundle providing Memcached (namespaced) for services via tags

  Sources   Download

own

The Requires

 

by Bogdan Yurov

30/06 2013

1.0.0

1.0.0.0

Bundle providing Memcached (namespaced) for services via tags

  Sources   Download

own

The Requires

 

by Bogdan Yurov