cornernote/yii2-cache-behavior

Cache behavior for Yii2.

Installs: 10 248

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 2

Forks: 1

Open Issues: 0

Type:yii2-behavior

1.0.3 2018-06-28 07:56 UTC

This package is auto-updated.

Last update: 2024-12-19 18:55:01 UTC


README

Latest Version Software License Build Status Coverage Status Quality Score Total Downloads

Cache behavior for Yii2.

Installation

The preferred way to install this extension is through composer.

Either run

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

or add

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

to the require section of your composer.json file.

Usage

In your ActiveRecord class:

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