Skip to content

undefinedor/yii2-CachedActiveRecord

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CachedActiveRecord For Yii2

Installation

The preferred way to install this extension is through Composer .

composer require undefinedor/yii2-cached-active-record

Configuration

In order to use CachedActiveRecord, a valid cache component must be enabled. For Example:

    'components' => [
        'cache' => [
            'class' => 'yii\caching\FileCache',
        ],
    ],

Usage

It's so easy to use ,you just need to use [[undefinedor\yii2\CachedActiveRecord]] For example,

    <?php
    
    namespace common\models;
    
    use undefinedor\yii2\CachedActiveRecord;
    use yii\db\ActiveRecord;
    
    class BaseActiveRecord extends ActiveRecord
    {
        use CachedActiveRecord;
        
        //todo 
    }

About

CachedActiveRecord For Yii2

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages