PHPackages                             asm89/twig-cache-extension - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. asm89/twig-cache-extension

Abandoned → [twig/cache-extension](/?search=twig%2Fcache-extension)ArchivedLibrary[Templating &amp; Views](/categories/templating)

asm89/twig-cache-extension
==========================

Cache fragments of templates directly within Twig.

1.4.0(6y ago)3886.8M—1.3%27[7 issues](https://github.com/asm89/twig-cache-extension/issues)[2 PRs](https://github.com/asm89/twig-cache-extension/pulls)3MITPHPPHP &gt;=5.3.2

Since Nov 13Pushed 5y ago23 watchersCompare

[ Source](https://github.com/asm89/twig-cache-extension)[ Packagist](https://packagist.org/packages/asm89/twig-cache-extension)[ Docs](https://github.com/asm89/twig-cache-extension)[ RSS](/packages/asm89-twig-cache-extension/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (9)Used By (3)

Twig cache extension
====================

[](#twig-cache-extension)

**This extension moved to the Twig organization. Check out the repository over there instead: .**

The missing cache extension for Twig. The extension allows for caching rendered parts of templates using several cache strategies.

[![Build Status](https://camo.githubusercontent.com/56e197e7bd6bae90eb6edece591c43cef77449dbf231a1275d8c7fada30a3035/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f61736d38392f747769672d63616368652d657874656e73696f6e2e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/asm89/twig-cache-extension)

Installation
------------

[](#installation)

The extension is installable via composer:

```
{
    "require": {
        "asm89/twig-cache-extension": "~1.0"
    }
}
```

Quick start
-----------

[](#quick-start)

### Setup

[](#setup)

A minimal setup for adding the extension with the `LifeTimeCacheStrategy` and doctrine array cache is as following:

```
