phpfluent / cachebundle
A fluent cache bundle for Symfony 2.
Installs: 5
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 1
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.3
- phpfluent/cache: dev-master
- symfony/framework-bundle: 2.*
- symfony/symfony: 2.*
This package is auto-updated.
Last update: 2024-11-24 03:59:31 UTC
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