undefinedor / yii2-cached-active-record
The cached activeRecord for the Yii2 framework
Installs: 1 282
Dependents: 0
Suggesters: 0
Security: 0
Stars: 10
Watchers: 4
Forks: 2
Open Issues: 0
Type:yii2-extension
Requires
- yiisoft/yii2: >=2.0.0
This package is not auto-updated.
Last update: 2024-12-02 15:00:07 UTC
README
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 }