PHPackages                             cornernote/yii2-cache-behavior - 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. cornernote/yii2-cache-behavior

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

cornernote/yii2-cache-behavior
==============================

Cache behavior for Yii2.

1.0.3(7y ago)210.5k1BSD-3-ClausePHP

Since Feb 27Pushed 7y ago1 watchersCompare

[ Source](https://github.com/cornernote/yii2-cache-behavior)[ Packagist](https://packagist.org/packages/cornernote/yii2-cache-behavior)[ RSS](/packages/cornernote-yii2-cache-behavior/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (4)Versions (6)Used By (0)

Yii2 Cache Behavior
===================

[](#yii2-cache-behavior)

[![Latest Version](https://camo.githubusercontent.com/28b133e9d37bb041340a338514d2a6f1b386e2baa6842eb14c04a2abcfe15ae6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7461672f636f726e65726e6f74652f796969322d63616368652d6265686176696f722e7376673f7374796c653d666c61742d737175617265266c6162656c3d72656c65617365)](https://github.com/cornernote/yii2-cache-behavior/tags)[![Software License](https://camo.githubusercontent.com/b60331a2084501dc07cf6d6964c0da58dd005d89c45cf3b28b4b22b60f5ec00f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4253442d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/fc2f38ca2d5f3c69d4838b9d2e9064f38b184c1c9cda69e217c3aad6312b84c4/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f636f726e65726e6f74652f796969322d63616368652d6265686176696f722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/cornernote/yii2-cache-behavior)[![Coverage Status](https://camo.githubusercontent.com/eddb0d3ad7b96babbbd5521e052f180241e4c3e026e7f939dea6c852e45a863a/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f636f726e65726e6f74652f796969322d63616368652d6265686176696f722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/cornernote/yii2-cache-behavior/code-structure)[![Quality Score](https://camo.githubusercontent.com/603c7bca85c81bf985c9327afaecc924e0190e5bbcc82b537899128584e88ca3/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f636f726e65726e6f74652f796969322d63616368652d6265686176696f722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/cornernote/yii2-cache-behavior)[![Total Downloads](https://camo.githubusercontent.com/cb7861d14f10a7378a86f2f45a6e75040df055b6b310b74986ce97ffb3e78acf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636f726e65726e6f74652f796969322d63616368652d6265686176696f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cornernote/yii2-cache-behavior)

Cache behavior for Yii2.

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

[](#installation)

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

Either run

```
$ composer require cornernote/yii2-cache-behavior "*"

```

or add

```
"cornernote/yii2-cache-behavior": "*"

```

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

Usage
-----

[](#usage)

In your ActiveRecord class:

```
public function behaviors() {
    return [
        \cornernote\cachebehavior\CacheBehavior::className(),
        // or
        [
            'class' => \cornernote\cachebehavior\CacheBehavior::className(),
            'cache' => 'cache',
            'backupCache' => 'fileCache',
        ],
    ];
}
```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~40 days

Total

4

Last Release

2882d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/07c84a589344489e8195ec1c6afcfa3abcc23a73092ceaa4ca60da96355c4d16?d=identicon)[cornernote](/maintainers/cornernote)

---

Top Contributors

[![cornernote](https://avatars.githubusercontent.com/u/51875?v=4)](https://github.com/cornernote "cornernote (24 commits)")

---

Tags

cacheyii2

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/cornernote-yii2-cache-behavior/health.svg)

```
[![Health](https://phpackages.com/badges/cornernote-yii2-cache-behavior/health.svg)](https://phpackages.com/packages/cornernote-yii2-cache-behavior)
```

###  Alternatives

[devgroup/yii2-tag-dependency-helper

Helper for unifying cache tag names with invalidation support in yii2

34507.4k7](/packages/devgroup-yii2-tag-dependency-helper)[undefinedor/yii2-cached-active-record

The cached activeRecord for the Yii2 framework

102.6k](/packages/undefinedor-yii2-cached-active-record)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
