dev-master
9999999-dev http://github.com/PHPFluent/CacheBundleA fluent cache bundle for Symfony 2.
New BSD
The Requires
cache development bundle symfony
A fluent cache bundle for Symfony 2.
A fluent cache bundle for Symfony 2., (*1)
composer require phpfluent/cachebundle, (*2)
Update the settings.yml file
php
services:
cache:
class: Doctrine\Common\Cache\ApcCache
, (*3)
Register the bundle ```php <?php //%/app/AppKernel.php, (*4)
$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
php
$cache = $this->get('phpfluent_cache');, (*5)
$cache['foo'] = 'bar'; //Caching echo $cache['foo'];//Retrieving from the cache ```, (*6)
A fluent cache bundle for Symfony 2.
New BSD
cache development bundle symfony