Redis common commands
1, Global command
1. Query key
Keys * query all keys and traverse all key values, complexity O(n)
2. Total number of keys
dbsize queries the total number of keys and directly obtains the total number of keys variable built in redis. The complexity is O(1)
3. Check whether the key exists
exists key returns 1 if it exists and 0 if it does n ...
Added by darklight on Fri, 11 Feb 2022 04:31:37 +0200
springbootCache and Redis caching mechanism
brief introduction
I want to develop a social networking site. Storing friends list on social networking sites has become a big problem in the development process.
If I want to save every user's friend information, how should I save it?
The user's id corresponds to the friend's id. such a message is a friend relationship map. This relati ...
Added by Magena Cadmar on Thu, 10 Feb 2022 23:32:20 +0200
Redis data type
Redis data type
Redis supports five data types: string, hash, list, set and Zset.
String (string)
As like as two peas, string is the most basic type of redis. You can understand it as a type that is exactly the same as Memcached, and a key corresponds to a value.
The string type is binary safe. This means that the redis string can con ...
Added by jimdavidson on Thu, 10 Feb 2022 19:05:27 +0200
Redis big key problem and scan command
brief introduction
Didn't you write an article earlier An implementation of like function Your article
Some problems were also raised at that time, and today we will solve some of them
start
Let's talk about the background first to avoid the confusion of not reading the previous article
Let's talk about the like function. Here we mainly so ...
Added by William on Thu, 10 Feb 2022 03:59:38 +0200
MyBatis L2 cache Association refresh implementation
1. Introduction to MyBatis cache
Mybatis supports caching, but without configuration, it only enables the L1 cache by default, and the L2 cache needs to be manually enabled.
The L1 cache is only relative to the same SqlSession. That is, for the same transaction, execute the same query method of the same Mapper multiple times. After the fir ...
Added by tready29483 on Thu, 10 Feb 2022 03:20:30 +0200
Web storage application cache
There are two storage methods in H5
1,window.sessionStorage session storage:
Save in memory. The lifecycle is to close the browser window. That is, the data is destroyed when the window is closed. Data can be shared in the same window.
2,window.localStorage local storage:
It may be saved in the browser memory or on the hard disk. Perm ...
Added by Jas on Sat, 05 Feb 2022 11:56:51 +0200
[Spring Cache] V understand the implementation process of Spring Cache from @ EnableCaching
preface
The previous chapters learned the following:
Cache manager related abstractionsAnnotations and attributes related to cache operationThe CacheOperation corresponding to the cache operation is related to the CacheOperationSource responsible for resolving the corresponding CacheOperations
The above content paves the way for an in-de ...
Added by rashmi_k28 on Thu, 03 Feb 2022 10:52:31 +0200
2022-1-28 Redis Java client Jedis/Lettuse
1. Open remote connection
Redis does not support remote connection by default and needs to be opened manually. Enter redis conf
Comment out the following bind ing Uncomment and set password (enable password verification) requirepass 123456 Then start redis
2. Jedis
Create a normal Maven projectAdd Jedis dependency
<dependency& ...
Added by mpar612 on Wed, 02 Feb 2022 17:11:59 +0200
vue login to different accounts in the same browser and overwrite the token
There is no problem logging in different accounts with the same browser, but there may be major problems. The second login will overwrite the token of the first login, resulting in the second login user operating some data of the first login. Here is a solution.
1. Log in to account A in the login window, and then copy the same url to log in t ...
Added by bigshwa05 on Thu, 27 Jan 2022 22:51:50 +0200
Redis implements distributed caching
Redis implements distributed caching
IDistributedCache,StackExchangeRedis
Redis learning tutorial:
Windows installs redis and sets the redis service to start automatically: https://blog.csdn.net/qq_40732336/article/details/122653953
Redis Chinese website https://www.redis.net.cn/
Build a Redis cluster in master / slave mode https://blog.cs ...
Added by jamesjohnson88 on Wed, 26 Jan 2022 14:15:33 +0200