# php-redis **Repository Path**: dershun/php-redis ## Basic Information - **Project Name**: php-redis - **Description**: PHP Redis扩展封装使用 - **Primary Language**: PHP - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-07-03 - **Last Updated**: 2023-07-03 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # util #### 介绍 PHP Redi扩展封装 #### 安装 ``` composer require dershun/php-redis ``` #### 使用说明 ``` use Dershun\Util\RedisString $config = [ 'host' => '127.0.0.1', 'port' => 6379, 'password' => '', 'select' => 0, 'timeout' => 0, 'expire' => 0, 'persistent' => false, 'prefix' => '' ]; $redis = new RedisString($config); $redis->set($name, $value, $expireIn); $redis->get($name); ``` 1. string类型 ``` use Dershun\Util\RedisString ``` 2. Stream类型 ``` use Dershun\Util\RedisString ```