Bloom filter solves cache breakdown problem

Cache penetration problem? Cache penetration: it is specified to use some nonexistent key s for a large number of queries on Redis, resulting in failure to hit. Each request will be sent to the persistence layer for query, resulting in great pressure on the database. What are the solutions? Implement flow restriction on our service interface ...

Posted by yzerman on Wed, 15 Dec 2021 03:23:31 +0100

[Redis] Redis cache penetration, cache breakdown and cache avalanche solutions

1, Redis cache penetration, cache breakdown and cache avalanche solutions The conventional use of Redis as a solution will not be described here, but directly cut into the topic. How did Redis's cache penetration, cache breakdown and cache avalanche come from? How? If you don't have a preliminary understanding and use of Redis, you can re ...

Posted by ultrus on Tue, 14 Dec 2021 05:47:11 +0100

Introduction to CPU cache, cache line and False Sharing

Cache Basics At present, general CPU s have three levels of memory (L1, L2, L3), as shown in the figure below. Of which: L1 cache is divided into two types: instruction cache and data cache. L2 and L3 caches are independent of instructions and data.L1 and L2 are cached in each CPU core, and L3 is the memory shared by all CPU cores.The closer ...

Posted by Jocke on Sun, 12 Dec 2021 16:58:35 +0100

Spring boot cache principle

Three notes @Cacheable can be marked on a method or a class. When marked on a method, it means that the method supports caching. When marked on a class, it means that all methods of the class support caching. For a method that supports caching, spring will cache its return value after it is called to ensure that the next time the method is ...

Posted by anon on Sat, 11 Dec 2021 14:41:58 +0100

spring source code learning: bean loading

For the function of loading bean s, the calling methods in Spring are: MyTestBean bean = (MyTestBean)bf.getBean("myTestBean"); What function does this code realize? Let's see what's written in AbstractBeanFactory getBean public Object getBean(String name) throws BeansException { return doGetBean(name, null, null, false); } protected & ...

Posted by Slippy on Fri, 10 Dec 2021 18:11:43 +0100

04 mybatis deferred loading and caching (based on XML configuration)

Mybatis user manual (4 of 5, continuously updated), collection + attention, don't get lost, hope to be helpful to my friends~ The source code link is at the end of the text ↓↓ 1. Mybatis deferred loading policy 1.1 introduction to delayed loading Mybatis deferred loading is to load data only when it is needed. When it is no ...

Posted by greenday on Thu, 09 Dec 2021 02:34:30 +0100

SpringBoot+Mybatis uses Redis as the secondary cache to implement and solve the problem that the cache [call clear() method] cannot be updated when deleting / modifying / adding.

1, Build environment Configure Maven.Spring boot integrates Redis.SpringBoot integrates Mybatis. The parent pom.xml file is as follows: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven ...

Posted by JustGotAQuestion on Thu, 09 Dec 2021 02:21:30 +0100

. Net Core WebApi custom resource filter (using cache)

If you want to use caching in WebApi, cache some result sets, which can reduce the pressure on the database server. The cache can be used according to the situation. Generally, it caches the data that is often queried and generally will not be updated. This article uses MemoryCache to cache data. Of course, there are many caching technologies, ...

Posted by javier on Sun, 05 Dec 2021 17:09:29 +0100

Redis | Redis hash related commands

        Redis supports a variety of data structures, such as string, list, set, ordered set and hash. This time I sorted out about   Hash   Related commands, that is, about   Hashes   The related commands are as follows.         The part in the red circle in the figure above is ...

Posted by Kieran Huggins on Tue, 23 Nov 2021 16:50:24 +0100

web technology sharing | LRU cache elimination algorithm

Before we know about LRU, we should know about cache. We all know that the computer has cache memory and can temporarily store the most commonly used data. When the cache data exceeds a certain size, the system will recycle it to free up space to cache new data, but the cost of retrieving data from the system is relatively high. Cache requireme ...

Posted by thebutler on Tue, 23 Nov 2021 12:18:27 +0100