Permalink
Browse files

update readme

  • Loading branch information...
1 parent 371ccd3 commit a7bfe2ae069effa03bce065908830c4cc465cb28 @kelu95 committed Jun 16, 2011
Showing with 8 additions and 1 deletion.
  1. +8 −1 README.markdown
View
@@ -2,14 +2,21 @@ ApcBundle - A bundle to use and manage APC cache for Symfony2 project
=====================================================================
The ApcBundle provides service to set/get/delete and more PHP APC Cache.
+This bundle now provide a twig extension to manage cache from template
- Basic example :
+PHP example :
$cache = $this->get('apc_cache');
if(!$cache->exist('my_cache_var')){
$cache->add('my_cache_value', [ int $ttl ]);
}
echo $cache->get();
+TWIG example :
+ {% if not cache('my_cache_var') %}
+ my renderer html code
+ {% endif %}
+ {{ cache_save()|raw }}
+
The ApcBundle also provides a command to clear APC cache from CLI.

0 comments on commit a7bfe2a

Please sign in to comment.