igormatkovic/memcache
| Install | |
|---|---|
composer require igormatkovic/memcache |
|
| Latest Version: | 1.7.2 |
| PHP: | >=5.3.0 |
| Laravel: | 4 |
| Last Updated: | Jan 26, 2015 |
| Links: | GitHub · Packagist |
Laravel 4 Memcache support
========
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 :/
Related Packages
Powerful PHP database abstraction layer (DBAL) with many features for database s...
Laravel Serializable Closure provides an easy and secure way to serialize closur...
Cli error handling for console/command-line PHP applications.
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 1.7.2 | >=5.3.0 | ~4.1 | ||
| 1.7.1 | >=5.3.0 | ~4.1 | ||
| 1.7 | >=5.3.0 | 4.1.* | ||
| 1.6 | >=5.4.0 | 4.2.* | ||
| 1.5 | >=5.4.0 | 4.2.* | ||
| 1.4 | >=5.4.0 | 4.2.* | ||
| 1.3 | >=5.4.0 | 4.2.* | ||
| 1.2 | >=5.4.0 | 4.2.* | ||
| 1.1 | >=5.4.0 | 4.2.* | ||
| 1.0 | >=5.4.0 | 4.2.* |