<?php namespace app\admin\controller; use think\cache\driver\Redis; use think\Controller; use \think\Db; class Index extends Controller { //获取redis public function getRedis() { $redis = new \Redis(); $redis->connect('127.0.0.1',6379); $redis->aut
LRANGE key start stop Related commands BLPOP BRPOP BRPOPLPUSH LINDEX LINSERT LLEN LPOP LPUSH LPUSHX LRANGE LREM LSET LTRIM RPOP RPOPLPUSH RPUSH RPUSHX Available since 1.0.0. Time complexity: O(S+N) where S is the start offset and N is the number of e
看了几天 redis开发与运维,写了个小demo练练手,直接上代码. 1.首先是数据库,本地要有redis,具体的如何安装redis,官网下个就好了,sososo. 2.启动redis 注意启动命令.另,我的redis数据是通过单元测试直接写到数据库里的,贴一下 @Test public void testJedisPool1(){ //create a simple and not-safe pool GenericObjectPoolConfig config = new GenericOb
Classes and methods Usage Class Redis Class RedisException Predefined constants Class Redis Description: Creates a Redis client Example $redis = new Redis(); Class RedisException phpredis throws a RedisException object if it can't reach the Redis ser