scullwm / swmcache-twig-extension
There is no license information available for the latest version (dev-master) of this package.
Flat Cache part of your content in Twig. Perfect to reduce render() gen time. Twig cache extension that work without dependency.
dev-master
2014-02-18 16:49 UTC
Requires
- php: >=5.3.2
- twig/twig: 1.*
This package is auto-updated.
Last update: 2024-12-24 15:52:29 UTC
README
Flat Cache part of your content in Twig. Perfect to reduce render() gen time. Twig cache extension that work without dependency.
Why
Couldn't find a simple twig cache extension that don't need many libs. Here it just use the Twig Cache Folder
Installation
The extension is installable via composer:
{ "require": { "scullwm/swmcache-twig-extension": "dev-master" } }
Usage
<?php // Declare Namespace use SwmCacheTwig\SwmCacheTwig; // Add Extension to Twig (here silex way) $twig->addExtension(new SwmCacheTwig()); ?>
How to use ?
{% swmcache 'ephemeride' '3600' %} {{ render(url('page_ephemeride')) }} {% endswmcache %}
Todo
- Write tests