PHPackages                             knplabs/knp-zend-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. [Caching](/categories/caching)
4. /
5. knplabs/knp-zend-cache-bundle

AbandonedArchivedSymfony-bundle[Caching](/categories/caching)

knplabs/knp-zend-cache-bundle
=============================

Integrates Zend Cache framework into Symfony2.

0.1(13y ago)383.1k14[1 PRs](https://github.com/KnpLabs/KnpZendCacheBundle/pulls)1MITPHPPHP &gt;=5.3.2

Since Jun 15Pushed 8y ago30 watchersCompare

[ Source](https://github.com/KnpLabs/KnpZendCacheBundle)[ Packagist](https://packagist.org/packages/knplabs/knp-zend-cache-bundle)[ Docs](http://github.com/KnpLabs/KnpZendCacheBundle)[ RSS](/packages/knplabs-knp-zend-cache-bundle/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (3)Versions (3)Used By (1)

\#This project is no longer maintained by KnpLabs
-------------------------------------------------

[](#this-project-is-no-longer-maintained-by-knplabs)

KnpZendCacheBundle
==================

[](#knpzendcachebundle)

In Symfony2 you can use [HTTP cache](http://symfony.com/doc/2.0/book/http_cache.html). That's great to cache a page or part of the page.

But what if you want to cache a variable? That's where you should use KnpZendCacheBundle.

To avoid code duplication we use the well-known [Zend Cache](http://framework.zend.com/manual/en/zend.cache.html) component in our Symfony2 application.
It works great and already has all sort of options - should you need it.

Behind the scene
----------------

[](#behind-the-scene)

This bundle allows to configure a `Zend\Cache\Manager`, and instanciate it, from the DIC.
It does not contain any caching logic: that's [Zend Cache](http://framework.zend.com/manual/en/zend.cache.html)'s role.

So you should read the [Zend Cache documentation](http://framework.zend.com/manual/en/zend.cache.introduction.html)if you need anything of the ordinary.

See [how to declare cache templates](http://framework.zend.com/manual/en/zend.cache.cache.manager.html), available [cache frontends](http://framework.zend.com/manual/en/zend.cache.frontends.html) and [cache backends](http://framework.zend.com/manual/en/zend.cache.backends.html).

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

[](#installation)

### Download KnpZendCacheBundle in vendor/bundles/Knp/Bundle/ZendCacheBundle dir

[](#download-knpzendcachebundle-in-vendorbundlesknpbundlezendcachebundle-dir)

If you use git:

```
git submodule add http://github.com/KnpLabs/KnpZendCacheBundle.git vendor/bundles/Knp/Bundle/ZendCacheBundle

```

### Download zend-cache to your vendor/Zend/Cache dir

[](#download-zend-cache-to-your-vendorzendcache-dir)

If you use git:

```
git submodule add http://github.com/KnpLabs/zend-cache.git vendor/Zend/Cache
git submodule add http://github.com/KnpLabs/zend-filter.git vendor/Zend/Filter

```

### Add the new namespaces to your autoloader

[](#add-the-new-namespaces-to-your-autoloader)

```
