A Redis production accident cost the company millions

1, Antecedents There is a core project of the company. The client of redis has always used jedis. Later, the technical director asked to replace the jedis client with a more efficient lettuce client, and use the RedisTemplate class of spring framework to operate redis. However, the world is unpredictable. It is such a simple demand that makes ...

Added by HAVOCWIZARD on Thu, 10 Mar 2022 14:48:00 +0200

Understand the difference between setup() and < script setup > < script > in vue3

setup () Setup () is a vue3 newly added component. Vue3 adopts the composite API. In order to use the composite API, we need an entry, which is called setup in the vue3 component. (to put it simply, do not use the data, method and calculated in vue2. All data and methods are written in setup.) Let's take a simple example: <template> ...

Added by Helios on Sat, 05 Mar 2022 21:30:27 +0200

For the addition, deletion, modification and query of a User table, I wrote nearly 200 lines of code

1, Basic version (including basic operation) This is the most common way of writing in our work RedisUtil: encapsulated Redis related API operationsRedisKeyPreConst: the key prefix involved in Redis cacheUserMapper: operation database The code implementation details are as follows: public class UserServiceImpl implements Use ...

Added by myraleen on Sat, 05 Mar 2022 16:04:56 +0200

Conclusion of Spring boot integrated learning 1.0: exception handling, integration of Mybatis, transaction, cache, JPA, dynamic log, RabbitMq, sending mail, background operation and deployment

https://blog.didispace.com/spring-boot-learning-1x/ 1. Unified exception handling of application Spring Boot provides a default mapping: / error. When an exception is thrown during processing, it will be transferred to the request for processing, and the request has a global error page to display the exception content. Access a nonexistent U ...

Added by mizz key_me on Sat, 05 Mar 2022 09:12:53 +0200

Multithreading tutorial ThreadPoolExecutor

Multithreading tutorial (32) ThreadPoolExecutor 1. Thread pool status ThreadPoolExecutor uses the upper 3 bits of int to indicate the thread pool status and the lower 29 bits to indicate the number of threads Status nameHigh 3 bitsReceive new tasksProcessing blocking queue tasksexplainRUNNING111YYSHUTDOWN000NYNew tasks are not received, bu ...

Added by sheffrem on Thu, 03 Mar 2022 12:48:27 +0200

Spring's solution to circular dependency and consideration of three-level cache

1, First, look at several circular dependencies 1. Constructor injection loop dependency @Service public class A { public A(B b) { } } @Service public class B { public B(A a) { } } 2. singleton pattern field property or setter injection cyclic dependency @Service public class A { @Autowired private B b; } @Service ...

Added by BLottman on Thu, 03 Mar 2022 09:00:22 +0200

Detailed explanation and principle of redis command of redis series

catalogue Redis redis application scenario Install compile & & start redis storage structure Five data structures of Redis string string basic command string storage structure Application of string data type in redis list list basic command list storage structure list application hsah Basic command storage struct ...

Added by artied on Thu, 03 Mar 2022 03:51:03 +0200

Deep understanding of redis -- Discussion on update strategy of cache double write consistency

1.Redis cache double write consistency2. Several update strategies for database and cache consistency2.1 update the database first and then the cache2.2 delete the cache first and then update the database2.3 update the database first and then delete the cache2.4 update the cache first, and then update the database3. canal of the implementation ...

Added by Fribbles on Tue, 01 Mar 2022 15:23:52 +0200

Glide's caching mechanism

Glide's cache is divided into two modules, one is memory cache and the other is hard disk cache. The function of memory cache is to prevent duplicate data from being read; The function of hard disk cache is to prevent applications from repeatedly downloading and reading data from the network or other places. Cache Key of Glide The code that ...

Added by davidprogramer on Sun, 27 Feb 2022 23:38:07 +0200

MyBatis dynamic sql, paging plug-in, cache

1, Important tags in xml 1.1. where label Query criteria entity class public class QueryTeamVO { private String name; private Date beginTime; private Date endTime; private String location; public QueryTeamVO() { } public QueryTeamVO(String name, Date beginTime, Date endTime, String location) { this.n ...

Added by erikjan on Sun, 27 Feb 2022 11:45:59 +0200