Prodigal son Tang Shao 2022-02-13 07:29:24 阅读数:17
redis It's a key-value Non relational database , Read data fast , It can be used as a cache to reduce the load pressure of the database .
redis There are five types , Namely String,list,hash,set,zset
（1）String type ： Can store any type of data , Like strings , Integers and floating point numbers
（2）list type ： Its structure is data duplication , Orderly
（3）hash type ： Its structure is value It's divided inside key-value, Suitable for storing object data
（4）set type ： Its structure is that the data cannot be repeated , disorder
（5）zset type ： Its structure is that the data cannot be repeated , Orderly
1） Cache data
2） Distributed lock
EXPIRE and PERSIST command
redis Persistence has RDB Strategy ,AOF Strategy ,redis Persistence of means redis Will write the data in the memory to the hard disk , stay redis Load this data on reboot , So as to minimize the impact of cache loss .
RDB Strategy ： The frequency of persistence is not high , Data loss is serious , Data security is low , but redis It provides users with higher performance of operating data
AOF Strategy ： Second persistence , With higher data security , If the server crashes , Only lose 1 Seconds of data
copyright：author[Prodigal son Tang Shao]，Please bring the original link to reprint, thank you. https://en.javamana.com/2022/02/202202130729222983.html