Project search of pinyougou mall
The search of this module mainly uses solr search engine + Ik word segmentation package and cache redis to achieve a piece of business.
1. Excellent purchase - Highlight
demand
The key words entered by the user are displayed in red font in the title, which is the common highlight in search.
The main idea is to add HTML bold color and other ...
Posted by BlackViperSJM on Mon, 21 Oct 2019 13:47:38 -0700
A dynamic refresh example of graphic verification code and verification code implemented by flash in python web Framework
This article is about the knowledge of implementing graphic verification code in the python web framework, Flask, for your reference. The following codes are described with their own project examples, with few related text content, mainly in the code Notes:
Self made graphic verification code
The graphic verification codes mentioned here are ...
Posted by Muntjewerf on Sun, 20 Oct 2019 06:33:34 -0700
Operating redis in go language
To use redis in go language, you need to download the official redis toolkit.
Execute in the go path path: go get github.com/garden/redis/redisIf git is not installed, you can download a zip package from the following link, and then unzip it to the local gopath path path.
If you don't know the path of gopath, look at the configuration parameter ...
Posted by launchcode on Sat, 19 Oct 2019 13:55:57 -0700
Applet development notes - add content security detection
In the previous two days, when the applet version was released, the audit was rejected because users did not perform security checks on the content when they published it, such as the name of the national leader.
Later I learned that the official document of the applet provided relevant detection interfaces, including text and image detection. ...
Posted by Moocat on Sat, 19 Oct 2019 09:27:48 -0700
Using TreeSet causes serialization exception java.io.NotSerializableException
Using TreeSet causes serialization exception
Problem Description: sort the second level classifications under the first level classification according to the order field (Integer type). At that time, a TreeSet was made and a user-defined Comparator was passed. It was OK to run locally, and the sortin ...
Posted by flameche on Fri, 18 Oct 2019 10:26:20 -0700
Solutions for high concurrency scenarios like seckill
Atomic transaction operation of redis
<?php
$http = new swoole_http_server("0.0.0.0", 9509); // Monitor 9509
$http->set(array(
'reactor_num' => 2, //reactor thread num
'worker_num' => 4 //worker process num
));
$http->on('request', function (swoole_http_request $request, swoole_http_re ...
Posted by chu70077 on Thu, 17 Oct 2019 08:53:18 -0700
Using redis under SpringBoot
When our project needs to use cache and high concurrency, we can use redis connection pool, let's go straight to the topic. The project environment of this paper is win 10, springboot 2.1.5.RELEASE, redis Java client jedis 2.9.3, fastjson 1.2.47 (for serialization). This project uses the lombok plug-in, so the set and get methods are replaced b ...
Posted by satanclaus on Wed, 16 Oct 2019 15:44:34 -0700
23 design patterns of Java, detailed explanation
I collated Java advanced materials for free, including Java, Redis, MongoDB, MySQL, Zookeeper, Spring Cloud, Dubbo high concurrency distributed and other tutorials, a total of 30G, which needs to be collected by myself.Portal: https://mp.weixin.qq.com/s/JzddfH-7yNudmkjT0IRL8Q
1. Chain Of Responsibility
Intent
It gives multiple objects th ...
Posted by globetrottingmike on Tue, 15 Oct 2019 23:48:27 -0700
Redis-4.0.14 Cluster installation and deployment
Redis-4.0.14 Cluster installation and deployment
The installation environment of this tutorial is kvm virtual machine and Intranet environment in nat mode. In order to save server resources, this paper uses a single instance Linux host for demonstration. Do not deploy multiple redis instances to a Linux server in the case of large traffic in ...
Posted by angelkay73 on Tue, 15 Oct 2019 09:18:32 -0700
Realize the synchronization between redis cache and database
I.
Through annotation, spring 3 above provides annotation for cache programming.
@Cacheable: used when querying. Note that Long type needs to be converted to Sting type, otherwise exceptions will be thrown.
@CachePut: used when updating. With this annotation, data will be queried from the DB.
@CacheEvic ...
Posted by JeroenVO on Tue, 15 Oct 2019 09:08:27 -0700