mybatis deferred loading and caching

preface Tip: Here you can add the general contents to be recorded in this article: For example, with the continuous development of artificial intelligence, machine learning technology is becoming more and more important. Many people have started learning machine learning. This paper introduces the basic content of machine learning. Ti ...

Posted by bradleyy on Sun, 05 Dec 2021 06:59:59 -0800

Go--Redis Quick Start Guide

Go—Redis 1, Basic introduction, installation and principle of Redis 1. Basic introduction: ① Redis is a NoSQL database (non relational database) 💨 Official website ② Redis (remote dictionary server), which means remote dictionary server, can reach 15w qps on a single machine. It is suitable for caching and persistence. ③ Redis is a high-p ...

Posted by bltesar on Fri, 03 Dec 2021 15:16:46 -0800

Functools.lru of Python caching mechanism_ cache

When it comes to the concept of cache, I think everyone should be familiar with it. Cache applications represented by Redis and Memcache have basically become the standard configuration of microservice architecture. In fact, it does not mean that Redis and other services must be deployed to use cache. For example, in small single applications ...

Posted by vasse on Sun, 21 Nov 2021 13:58:22 -0800

[Special Topic on Redis source code analysis] from the essence analysis, why is the data you wrote in Redis missing?

Introduction to Redis database As a mature data storage middleware, Redis provides perfect data management functions, such as data expiration mentioned earlier and the data evict strategy we want to talk about today. Data locality principle The principle of locality, which runs through computer science, can clearly tell you that there are ...

Posted by pixelgirl on Fri, 12 Nov 2021 03:20:48 -0800

mybatis caching mechanism

mybatis cache mechanism I mybatis provides cache support, which is divided into L1 cache and L2 cache L1 cache The first level cache is enabled by default in mybatis. It is a cache form with hashMap as the data structure. How do I verify the L1 cache? The following example queries the same data twice (or multiple times, twice is ...

Posted by Wayniac on Wed, 10 Nov 2021 02:02:49 -0800

An online problem I solved at work

In many scenarios, the zookeeper cluster is used. For example, it uses its consistency ability and node monitoring ability to realize a variety of business functions.The problem encountered this time is that the zookeeper disk util is too high.First view the await index and util index of the disk through iostat, as shown in the following figure ...

Posted by maxrisc on Sat, 06 Nov 2021 13:34:02 -0700

After using the cache object ConcurrentLruCache, the key value cannot be hit, resulting in the failure to improve the system performance

1. Problem Description: Concurrent lrucache is used as the JVM cache pool object public class UserManager { private ConcurrentLruCache<UserCacheKey, UserInfo> cache = new ConcurrentLruCache<UserCacheKey, UserInfo>(100, new Function<UserCacheKey, UserInfo>() { @Override public UserInfo apply(UserCacheK ...

Posted by lisa3711 on Thu, 04 Nov 2021 22:15:27 -0700

redisson solves oversold cases

  1. Import dependent packages of Redisson and StringRedisTemplate <!--redisson rely on--> <dependency> <groupId>org.redisson</groupId> <artifactId>redisson</artifactId> <version>2.2.13</version> </dependency> <!--StringRedisTemplate rely on--> <dependency> ...

Posted by frobak on Sun, 31 Oct 2021 04:35:48 -0700

Hash table of data structure

1, Basic introduction 1. Basic introduction Hash table (also known as hash table) is a data structure that is accessed directly according to the Key value. In other words, it accesses records by mapping key values to a position in the table to speed up the search. This mapping function is called hash function, and the array storing records is ...

Posted by thenature4u on Thu, 28 Oct 2021 20:36:02 -0700

[distributed application] distributed lock learning summary

catalogue Application scenario: Basic principle: Implementation method 1: Using redis as distributed lock Implementation mode 2: Using redistribution as a distributed lock Application scenario: In current distributed applications, there are often scenarios where high concurrent traffic accesses db. In order to prevent the database from ...

Posted by RockyShark on Thu, 28 Oct 2021 06:17:25 -0700