Permalink
Browse files

-

  • Loading branch information...
kelu95 committed Jun 16, 2011
1 parent a7bfe2a commit 93cb52abb425d50b98c9babd31ca99db6a00ffc4
Showing with 4 additions and 2 deletions.
  1. +4 −2 README.markdown
View
@@ -4,14 +4,16 @@ 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
-PHP 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 :
+TWIG example :
+
{% if not cache('my_cache_var') %}
my renderer html code
{% endif %}

0 comments on commit 93cb52a

Please sign in to comment.