PHPackages                             thamtech/yii2-multilevel-cache - 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. thamtech/yii2-multilevel-cache

ActiveYii2-extension[Caching](/categories/caching)

thamtech/yii2-multilevel-cache
==============================

A multi-level cache component for Yii2

v0.1.0(5y ago)03BSD-3-ClausePHPPHP &gt;=5.6.0CI failing

Since Jun 5Pushed 5y ago1 watchersCompare

[ Source](https://github.com/thamtech/yii2-multilevel-cache)[ Packagist](https://packagist.org/packages/thamtech/yii2-multilevel-cache)[ RSS](/packages/thamtech-yii2-multilevel-cache/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

Yii2 Multilevel Cache
=====================

[](#yii2-multilevel-cache)

Multilevel cache is a [Yii2](http://www.yiiframework.com) cache component to support multi-level caching.

Configure a fast, local cache component like [ArrayCache](https://www.yiiframework.com/doc/api/2.0/yii-caching-arraycache)as the `level1` cache, and configure a slower cache component like [FileCache](https://www.yiiframework.com/doc/api/2.0/yii-caching-filecache) as the `level2` cache. The multilevel cache component will automatically check the `level1` cache first and only check `level2` and populate `level1` with the result when `level1` misses.

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

```
php composer.phar require --prefer-dist thamtech/yii2-multilevel-cache

```

or add

```
"thamtech/yii2-multilevel-cache": "*"

```

to the `require` section of your `composer.json` file.

Usage
-----

[](#usage)

Application configuration example:

```
