phpfluent/cachebundle
Composer 安装命令:
composer require phpfluent/cachebundle
包简介
A fluent cache bundle for Symfony 2.
README 文档
README
A fluent cache bundle for Symfony 2.
Installation
composer require phpfluent/cachebundle
Update the settings.yml file
services:
cache:
class: Doctrine\Common\Cache\ApcCache
Register the bundle
<?php //%/app/AppKernel.php $bundles = array( new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), new Symfony\Bundle\TwigBundle\TwigBundle(), new Symfony\Bundle\MonologBundle\MonologBundle(), new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(), /** * Your bundles */ new PHPFluent\Bundle\CacheBundle\CacheBundle(), );
Call it from your code
$cache = $this->get('phpfluent_cache'); $cache['foo'] = 'bar'; //Caching echo $cache['foo'];//Retrieving from the cache
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: New
- 更新时间: 2013-02-26