Bloom filter [proposed by bloom in 1970; Redis cache penetration solution]
What is a bloom filter
Bloom Filter was proposed by a young man named bloom in 1970. It has been 50 years since then.
It is actually a very long binary vector and a series of random mapping functions. Everyone should know that the stored data is either 0 or 1, and the default is 0.
It is mainly used to judge whether an element is in a set. 0 ...
Posted by arun_php on Sun, 13 Feb 2022 17:37:23 +0100
caffeine, the king of cache performance, uses documents
1.caffeine features
Caffeine uses ConcurrentHashMap internally, provides a variety of cache elimination mechanisms (according to time, weight, quantity, etc.), and supports elimination notification. Moreover, caffeine has high cache performance on the premise of ensuring thread safety, which is known as the king of cache
1.1 official performa ...
Posted by edzulis on Sat, 12 Feb 2022 09:05:51 +0100
Redis common command notes
1, Common commands for keys
keys * View all current key
exists key Judge a key Does it exist
type key View your key What type is it
del key Delete the specified key data
unlink key according to value Select non blocking delete to delete only keys from keyspace If the metadata is deleted, the real deletion will be carried out in subsequent asyn ...
Posted by vbzoom.com on Fri, 11 Feb 2022 22:06:07 +0100
Overview of Redis data types
Redis official website: https://redis.io Redis Chinese official website: http://www.redis.cn
The following is an overview of Redis data types, which can be read intuitively by using code blocks.
1, Base point
1. There are 16 Redis databases by default, and the first one is used by default. Use select to switch databases. 2. The default port ...
Posted by rroc on Fri, 11 Feb 2022 19:49:51 +0100
Multithreading -- three characteristics of concurrent programming
Three characteristics of concurrent programming
1. Visibility: the visibility of shared variables among threads, that is, when one thread changes the value of shared variables, other threads can also see and update the value in their own threads. Shared resources are generally placed in the heap space (main memory). Each thread will copy a cop ...
Posted by Niel Roos on Wed, 09 Feb 2022 08:55:51 +0100
[Redis] beginner's Guide - how does Redis work in real life?
In the era of WebServer, Jedis direct connection is mostly used in the code to operate Redis server, so people will package a tool class in the project for Jedis. However, in the era of microservice integration SpringBoot, letstructure (underlying Netty, NIO mode) is used. We only need to pay attention to the use of RedisTemplate, but there are ...
Posted by suvarthi on Tue, 08 Feb 2022 03:35:51 +0100
Redis persistence - AOF
catalogue
1 what is AOP
2 appendonly.aof file
3 Rewrite
3.1 what is rewrite
3.2 rewriting principle
3.3 trigger mechanism
4 advantages and disadvantages of AOF
5 Summary
5.1 comparison between RDB and aof
5.2 enable two persistence methods at the same time
1 what is AOP
Record every write operation in the form of log, and rec ...
Posted by badassrocker on Thu, 03 Feb 2022 20:42:18 +0100
Implementation principle of springboot @Cacheable
1. Use of springboot cache
a.pom introduce jar spring-boot-starter-cache
b.Add annotation to startup class@EnableCaching
c.Add annotations to the methods that need to be cached @Cacheable(cacheNames = "com:xxx",key = "''+#id")
Figure 1
2. Implementation principle of cacheable
What is the implementation principle? The first reaction ...
Posted by plasmagames on Thu, 03 Feb 2022 12:24:48 +0100
[Spring Cache] II. Notes and attributes related to Spring Cache operation
preface
In this chapter, learn about the Spring defined annotation @ Cacheable @CachePut @CacheEvict @Caching @CacheConfig and related properties
@Cacheable
/**
* Cacheable Indicates that the caching behavior is enabled. If it is on the annotation class, it means that all methods are cached
* Cache keys are generated based on parameter ...
Posted by locell on Thu, 03 Feb 2022 10:03:39 +0100
Redis distributed lock, redis read / write lock, red lock, redis cache design, cache and database synchronization
Redis distributed lock
Redis is a single process and single thread mode. The queue mode is adopted to change concurrent access into serial access, and there is no competition between multiple clients for redis connection. In redis, SETNX command can be used to realize distributed locking.
If and only if the key does not exist, set the val ...
Posted by starsol on Thu, 03 Feb 2022 03:03:55 +0100