• . Net client implements pipeline and transactions in redis


    preface Pipeline feature in redis: briefly describe how redis sends multiple commands from the client at one time, and how the server responds to multiple commands from the client at one time. Redis uses the TCP server of the client server model and request / response protocol, which means that a request can be completed […]

  • Redis database installation method and automatic startup script sharing under Linux


    installRedis (1) Download redis ? 1 2 wget http://redis.googlecode.com/files/redis-2.2.11.tar.gz tar xzvf redis-2.2.11.tar.gz (2) Compile and install redis ? 1 make && make install (3) Copy and modify configuration files ? 1 2 cp redis.conf /etc/redis.conf vi /etc/redis.conf Note the following modifications: ? 1 2 3 4 daemonize yes loglevel warning logfile /var/log/redis.log maxmemory 2GB (do […]

  • Batch operation of redis database with Python


    Method 1: use   pipeline When using pipelining to send a command, the redis server must put some requests in the queue (using memory). After execution, the redis server sends the results at one time   During the use of pipeline, it will be “exclusive” link, and other operations of non “pipeline” type cannot be […]

  • . net core uses redis based on stackexchange.redis


    . net core uses redis based on stackexchange.redis tutorial, as follows 1、 Add reference package StackExchange.Redis Microsoft.Extensions.Configuration 2、 Modify the configuration file appsettings.json { “RedisConfig”: { “Redis_Default”: { “Connection”: “ 6379”, “InstanceName”: “Redis1: ” }, “Redis_6”: { “Connection”: “ 6379”, “DefaultDatabase”: 6, “InstanceName”: “Redis2: ” } } } 3、 Simple packaging Redisclient.cs class public class […]

  • Go implementation of redis connection pool


    1、 What is connection pool and what is the use of connection pool Let’s take a look at how others introduce connection pools: The basic idea of connection pool is to store the database connection as an object in memory during system initialization. When users need to access the database, they do not establish a […]

  • Detailed explanation of how to customize redis command with Lua


    preface As a very successful database, redis provides a wealth of data types and commands. Using these, we can easily and efficiently complete many cache operations, but there are always some special problems or needs to be solved. At this time, we may need to customize our own redis data structure and commands. Redis command […]

  • Lua read redis data null judgment example code


    preface WhyluaScript operationredisdatabase 1. Reduce overhead – reduce the number of requests to the redis server 2. Atomic operation – redis executes Lua script as an atom 3. Reusable – other clients can use Lua scripts that have been executed 4. Increase redis flexibility – Lua script can help redis do more things Lua script […]

  • PHP uses the ordered set Zset of redis to implement the application example of delay queue


    In this paper, an example is given to show how PHP uses the ordered set Zset of redis to implement the delay queue. The details are as follows: Delay queue is a message queue with delay function. Compared with ordinary queue, it can consume messages at a specified time. Application scenarios of delay queue: 1. […]

  • Several common operation modes and usage examples of PHP using redis


    This paper introduces several common operation modes and usages of redis in PHP. The details are as follows: 1、 Simple string caching For example, cache some data with slow SQL query and infrequent update. <?php $redis = new Redis(); $redis->connect(‘’, 6379, 60); $sql = ‘select * from tb_order order by id desc limit 10’; //Pseudo […]

  • How to publish and subscribe with redis by. Net core


    Redis is a memory database with very strong performance. It is generally used as a cache, but it can not only be used as a cache. For example, the famous distributed framework Dubbo can use redis as a service registry. Next, let’s introduce how. Net core uses redis’s publish / subscribe function. Redis publish subscribe […]

  • Write a redis data synchronization tool based on C #


    concept Redis is an open source log and key value database written in ANSI C language, supporting network, memory based and persistent. Similar to memcached, redis supports more value types, including string, list, set, Zset and hash. On this basis, redis supports various sorting methods. Like memcached, data is cached in memory to ensure efficiency. […]

  • Implementation of simple second kill system by integrating redis with springboot


    This example for you to share the spring boot integration redis simple seckill system specific code, for your reference, the specific content is as follows The project has an address. I’ll put it at the end of the article 1. Direct service. We will introduce two second kill modes public interface GoodsService { /** *Second […]