缓存 - 关于redis持久化?
滿天的星座
滿天的星座 2017-04-24 16:00:20
0
1
784

有提过一个问题/q/1010000004340655?_ea=575030,回答的少没太能明白。
我重新描述下,有的朋友说内存满了,旧数据会删除,硬盘上的也自动没了,如果这样的逻辑来说,他并不是持久化啊?比如:你有一个KEY,开始的时候也同步到硬盘了,但是后期有更多数据内存满后REDIS自动把这个KEY删除了,哪么下次你GET这个KEY的时候,他会取硬盘读吗?(持久化方式是AOF)

滿天的星座
滿天的星座

reply all(1)
漂亮男人

If the memory recycling mechanism is set up, old data will indeed be deleted when the memory is full. In this way, when persisting again, the corresponding persistent data in the disk will also be deleted. But persistence only refers to writing data from memory to disk. For example, when data is stored in MySQL, we will also call it persistence. But after you delete a piece of data in the database, there will be one less record in the database. .
In addition, Redis persistence should not provide query functions, which means that if the memory cannot be found, check the disk. Persistent data will be synchronized to the memory. If it does not exist in the memory, it should theoretically not exist on the disk.
I have answered your original post. You should be able to understand the link attached if you go in and take a closer look.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template