bru2s/cache-service-provider
最新稳定版本:0.0.4.1
Composer 安装命令:
composer require bru2s/cache-service-provider
包简介
Modyfication of dafiti/cache-service-provider. Filesystems support added.
关键字:
README 文档
README
A Silex Service Provider for Doctrine Cache.
Instalation
{
"require": {
"bru2s/cache-service-provider": "dev-master"
}
}
Adapters Availables
To use Memcache
sudo apt-get install php5-memcached
To use Memcached
sudo apt-get install php5-memcached
To use Redis Adapter install PHPRedis
git clone git@github.com:phpredis/phpredis.git
cd phpredis
phpize
./configure
make && make install
Usage
use Silex\Application; use Bru2s\Silex\CacheServiceProvider; $app = new Application(); $app['config'] = [ 'cache' => [ 'adapter' => 'Memcache', 'host' => '127.0.0.1', 'port' => 11211, 'connectable' => true // If not need of one connection put FALSE (in Filesystem must be FALSE) ] ]; $app->register(new CacheServiceProvider()); $app['cache']->save('your-key', 'your-data'); $data = $app['cache']->fetch('your-key'); echo $data; // your-data
License
MIT License
统计信息
- 总下载量: 407
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-09-17