dev-master
9999999-dev https://leibinger.ioSmyfony Bundle which provides integration for Memcached
MIT
The Requires
- php >=5.4
- symfony/symfony ^2.7|^3.0
by Benjamin Leibinger
cache memcached
Smyfony Bundle which provides integration for Memcached
This Symfony Bundle provide Memcached integration into Symfony. It provides the configured pools as Singleton., (*1)
The Bundle is inpsired by: https://gist.github.com/benr77/258e42642b4632d5a826 https://github.com/LeaseWeb/LswMemcacheBundle, (*2)
To install IslMemcachedBundle with Composer just add the following to your 'composer.json' file:, (*3)
{ require: { "isl/memcached-bundle": "*", ... } }
The next thing you should do is install the bundle by executing the following command:, (*4)
php composer.phar update isl/memcached-bundle
Finally, add the bundle to the registerBundles function of the AppKernel class in the 'app/AppKernel.php' file:, (*5)
public function registerBundles() { $bundles = array( ... new Isl\MemcachedBundle\IslMemcachedBundle(), ... );
Install the following dependencies (in Debian based systems using 'apt'):, (*6)
apt-get install memcached php5-memcached
Do not forget to restart you web server after adding the Memcache module., (*7)
Below you can see an example configuration for this bundle., (*8)
isl_memcached: pools: default: servers: - { host: 10.0.0.1, port: 11211, weight: 15 } - { host: 10.0.0.2, port: 11211, weight: 30 } pool2: servers: - { host: 10.0.0.3, port: 11211, weight: 15 }
$memcache = $this->get('isl.memcached')->getInstance('defaultpool', "persistentId optional");, (*9)
$memcache->set('foo', 'bar'); $memcache->get('foo');, (*10)
Based on: https://github.com/LeaseWeb/LswMemcacheBundle, (*11)
The methods are modified to work with memcached extension., (*12)
This bundle is under the MIT license., (*13)
Smyfony Bundle which provides integration for Memcached
MIT
cache memcached