dershun/php-redis

PHP Redi扩展封装使用

维护者

详细信息

gitee.com/dershun/php-redis.git

1.0.0 2023-07-03 10:47 UTC

This package is not auto-updated.

Last update: 2024-09-24 14:44:13 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. 字符串类型
use Dershun\Util\RedisString
  1. 流类型
use Dershun\Util\RedisString