<?php
/**
 * Created by PhpStorm.
 * User: leo
 * Date: 2018/2/28
 * Time: 上午11:43
 */

namespace common\components;

use yii\redis\Connection;

class Redis extends Connection
{

    /**
     * Redis constructor.
     * @param array $config
     * @throws \RedisException
     */
    public function __construct($config = [])
    {
        parent::__construct($config);
        $this->open();
    }

    public static function key($key){
        return md5($key);
    }
}