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.

Installs: 60

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 2

Forks: 0

Open Issues: 0

pkg:composer/scullwm/swmcache-twig-extension

dev-master 2014-02-18 16:49 UTC

This package is auto-updated.

Last update: 2025-09-24 17:56:40 UTC


README

Flat Cache part of your content in Twig. Perfect to reduce render() gen time. Twig cache extension that work without dependency.

Total Downloads

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