dafiti/cache-service-provider 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

dafiti/cache-service-provider

最新稳定版本:0.0.3

Composer 安装命令:

composer require dafiti/cache-service-provider

包简介

A Silex Service Provider for Doctrine Cache

README 文档

README

Build Status Scrutinizer Code Quality Code Coverage HHVM Latest Stable Version Total Downloads License

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

GitHub 信息

  • Stars: 5
  • Watchers: 5
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-04-02