igormatkovic / memcache
Memcache module for Laravel 4
Installs: 8 260
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 2
Forks: 5
Open Issues: 1
Requires
- php: >=5.3.0
- illuminate/support: ~4.1
Requires (Dev)
- illuminate/cache: ~4.1
- mockery/mockery: dev-master
README
========
SetUp Application
Add the package to your composer.json and run composer update.
"igormatkovic/memcache": "dev-master"
Add the memcache service provider in app/config/app.php:
'Igormatkovic\Memcache\MemcacheServiceProvider',
You may now update your app/config/session.php config file to use memcache
'driver' => 'memcache',
OR...
Add this to your app/start/global.php (Cache only)
use Illuminate\Cache\Repository; use Igormatkovic\Memcache\MemcacheStore; use Igormatkovic\Memcache\MemcacheConnector; Cache::extend('memcache', function($app) { $servers = Config::get('cache.memcached'); $prefix = Config::get('cache.prefix'); $memcache = (new MemcacheConnector())->connect($servers); return new Repository(new MemcacheStore($memcache, $prefix)); });
Update your driver app/config/cache.php
'driver' => 'memcache',
Unit test view phpunit
phpunit
Notice: This memcache driver uses the same config as Memcached
This addon was build because of the Webtatic repo lacking Memcache Support :/