PHP code example of undefinedor / yii2-cached-active-record
1. Go to this page and download the library: Download undefinedor/yii2-cached-active-record library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
undefinedor / yii2-cached-active-record example snippets
'components' => [
'cache' => [
'class' => 'yii\caching\FileCache',
],
],
namespace common\models;
use undefinedor\yii2\CachedActiveRecord;
use yii\db\ActiveRecord;
class BaseActiveRecord extends ActiveRecord
{
use CachedActiveRecord;
//todo
}