mcfedr/memcached-bundle

The smallest, simplest memcached bundle

Installs: 2 410

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 3

Forks: 0

Open Issues: 0

Type:symfony-bundle

2.1.1 2016-09-08 08:49 UTC

This package is auto-updated.

Last update: 2024-04-29 03:07:07 UTC


README

This is going to be the simplest bundle you have ever seen for memcached

Latest Stable Version License Build Status SensioLabsInsight

Install

  • composer require mcfedr/memcached-bundle

  • Update your Kernel

    new Mcfedr\MemcachedBundle\McfedrMemcachedBundle()

Configuration

You can setup as many memcached connections as you need, although most of the time one is enough. You need to have at least one server for each connection.

Optionally you can make a connection persistent, this is recommended for better performance.

mcfedr_memcached:
    connections:
        main:
            persistent_id: main
            servers:
                - host: 127.0.0.1
                  port: 11211
        other:
            servers:
                - host: 10.0.0.10
                  port: 11211
                - host: 10.0.0.11
                  port: 11211
                - host: 10.0.0.12
                  port: 11211

Each connection will be available as a service called "mcfedr_memcached.$name". So in the example there are two services:

  1. mcfedr_memcached.main
  2. mcfedr_memcached.other