dafiti/cache-service-provider
最新稳定版本:0.0.3
Composer 安装命令:
composer require dafiti/cache-service-provider
包简介
A Silex Service Provider for Doctrine Cache
关键字:
README 文档
README
A Silex Service Provider for Doctrine Cache.
Instalation
{
"require": {
"dafiti/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 Dafiti\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 ] ]; $app->register(new CacheServiceProvider()); $app['cache']->save('your-key', 'your-data'); $data = $app['cache']->fetch('your-key'); echo $data; // your-data
License
MIT License
统计信息
- 总下载量: 348
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-04-02