Using PHP+Redis to delay tasks and automatically cancel orders

Simple timing task solution: when using redis's keyspace notifications, you need to note that this function is launched after redis version 2.8, so the reids on your server should be at least 2.8 or above; (A) business scenario: 1. When a business is triggered, a scheduled task needs to be started, and another task needs to be executed within t ...

Posted by Sanjib Sinha on Wed, 20 Nov 2019 00:18:31 -0800

Take you to set up your own virtual machine and Redis cluster environment, which is worth collecting!

Preface: We've seen a lot of articles analyzing the use or principles of Redis, but the introduction to a complete set of independent redis cluster environments is not much or not detailed enough. Then, this paper will take you hand to set up a Redis cluster environment, Redis cluster in the company's internal production environment, mostly bu ...

Posted by methodman on Tue, 19 Nov 2019 18:23:55 -0800

Notes on the installation of Redis3.0 in CentOS 6.5

CentOS 6.5 install Redis3.0 1. Install C compilation environment First, you need to install the C environment for compiling Redis, and execute the following commands at the command line: [root@itzhouq32 tools] yum install gcc-c++ 2. Upload redis3.0 to Linux 3. Unzip redis. I unzip it to / usr/local [root@itzhouq32 tools]# tar -xvf redis-3.0.0.t ...

Posted by jwwceo on Tue, 19 Nov 2019 10:43:52 -0800

Django framework 5-cookie s and session s

Why do we have cookie s and session s? Browser sends http request to server, establishes session, server returns complete, session ends, browser and service disconnect Send the http request again and establish the session again. The user information will be lost. The server cannot distinguish the requested information. A login account. After t ...

Posted by NINTHTJ on Tue, 19 Nov 2019 07:26:37 -0800

PHP programmers - common tools

Three links There are often students in the community who ask, "is my PHP program blocked, is my PHP program open (not confident about the code I wrote), and is my PHP program problematic?" then they post their own programs, and enter the happy irrigation link. As time goes on, we have not formed a systematic solution. It is better to ...

Posted by blade_922 on Mon, 18 Nov 2019 22:53:22 -0800

Precautions for spring boot 1.x up 2.x

Record some errors during upgrade. This upgrade is 1.5.x upgrade to 2.1.4 ---------------------------------------------- If java version is lower than 8, please do not upgrade. spring boot 2.0 requires at least java 8. ---------------------------------------------- One: WebMvcConfigurerAdapter has been abandoned @Configuration public cl ...

Posted by flying_circus on Mon, 18 Nov 2019 00:57:01 -0800

. NET Core tutorial -- add a server cache to the API

In the past, the basic way to write cache to API interface was to write code as follows: // redis key var bookRedisKey = ConstRedisKey.RecommendationBooks.CopyOne(bookId); // Get cached data var cacheBookIds = _redisService.ReadCache<List<string>>(bookRedisKey); if (cacheBookIds != null) { // return } else { // Perf ...

Posted by mlefebvre on Sat, 16 Nov 2019 11:04:25 -0800

java version of spring cloud+spring boot social e-commerce platform -- Spring cloud gateway current limiting

Generally, there are two ways to realize current limiting, token bucket and leaky bucket. Gold bucket is the number of initialization tokens (containers), which can be passed by taking the token inside. No token can't report an error. You can set the speed and maximum number of tokens to be added to the container The leaky bucket is to put a re ...

Posted by cloudy243 on Fri, 15 Nov 2019 09:22:49 -0800

Spring security spring boot + spring security SMS confirmation

Now there are three main login methods: account password login, SMS verification code login and third-party authorized login. The previous section Spring security (3) -- authentication process We have analyzed the spring security account password mode login. Now let's analyze the spring security SMS mode authentication login.   &emsp ...

Posted by aissa on Thu, 14 Nov 2019 20:19:01 -0800

workerman also has scheduled tasks

Download workerman https://www.workerman.net/download   2. Download workerman/mysql http://doc3.workerman.net/640201 1. The timing function is an anonymous function (closure) use \Workerman\Worker; use \Workerman\Lib\Timer; require_once './Workerman/Autoloader.php'; $task = new Worker(); // Start how many processes to ru ...

Posted by StathisG on Thu, 14 Nov 2019 11:12:02 -0800