PHP Redis扩展操作类

PHP语言Redis扩展类DEMO[code lang="php"class MyRedis private $redis;/** @param string $hos* @param int $pos*public function __construct($host = '10.102.1.8', $port = 6379) $this->redis = new Redis$this->redis->connect($host, $port);return $this->red/** 设置值 构建一个字符串* @param string $key KEY名称* @param string $value 设置值* @param int $timeOut 时间 0表示无过期时间*public function set($key, $value, $ti... Read More

Redis(PHP)常用操作

[code lang="php"class MyRedis private $redis;/** @param string $hos* @param int $pos*public function __construct($host = '10.102.1.8', $port = 6379) $this->redis = new Redis$this->redis->connect($host, $port);return $this->red/** 设置值 构建一个字符串* @param string $key KEY名称* @param string $value 设置值* @param int $timeOut 时间 0表示无过期时间*public function set($key, $value, $timeOut=0) $retRes ... Read More