dershun/php-redis

PHP Redi扩展封装使用

1.0.0 2023-07-03 10:47 UTC

This package is not auto-updated.

Last update: 2025-07-01 18:10:11 UTC


README

介绍

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
  1. Stream类型
use Dershun\Util\RedisString