PHPackages                             eglobal/template-cache-bundle - 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. eglobal/template-cache-bundle

ActiveSymfony-bundle[Templating &amp; Views](/categories/templating)

eglobal/template-cache-bundle
=============================

Symfony template caching functionality.

1.0.8(6y ago)03.3k3[1 PRs](https://github.com/eglobal-it/EGlobalTemplateCacheBundle/pulls)MITPHPPHP &gt;=7.1CI failing

Since Jan 19Pushed 4y ago1 watchersCompare

[ Source](https://github.com/eglobal-it/EGlobalTemplateCacheBundle)[ Packagist](https://packagist.org/packages/eglobal/template-cache-bundle)[ RSS](/packages/eglobal-template-cache-bundle/feed)WikiDiscussions master Synced today

READMEChangelog (7)Dependencies (14)Versions (9)Used By (0)

EGlobalTemplateCacheBundle
==========================

[](#eglobaltemplatecachebundle)

[![Build Status](https://camo.githubusercontent.com/6b6c2006946cff1f51e2cf0175510803d65fa71a2714e41bf93289e548613485/68747470733a2f2f7472617669732d63692e6f72672f65676c6f62616c2d69742f45476c6f62616c54656d706c617465436163686542756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/eglobal-it/EGlobalTemplateCacheBundle)

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

[](#installation)

Install this bundle using Composer. Add the following to your composer.json:

```
{
    "require": {
        "eglobal/template-cache-bundle": "~1.0"
    }
}
```

Register bundle in the app/AppKernel.php:

```
public function registerBundles()
{
    $bundles = [
        // ...
        new EGlobal\Bundle\TemplateCacheBundle\EGlobalTemplateCacheBundle(),
    ];
}
```

Update config:

```
parameters:
    locales:
        - en
        - es
        - de

# If using Assetic, add the bundle to the config
assetic:
    bundles:
        - EGlobalTemplateCacheBundle

eglobal_template_cache:
    # Locales to be cached
    locales: "%locales%"
    # Cache only exposed routes
    exposed_routes_only: false
    # Public directory to store cached templates
    cache_dir: '%kernel.root_dir%/../web/templates'
    # Public prefix of cached templates
    public_prefix: '/templates'
    # Directories to search cacheable templates in
    root_dirs:
        - "@AcmeFooBundle/Controller"
        - "@AcmeBarBundle/Controller/Cacheable"
```

Example usage
-------------

[](#example-usage)

Mark controller routes as cacheable

```
