亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

Redis掛掉,緩存丟失了后續(xù)怎么處理?
伊謝爾倫
伊謝爾倫 2017-04-24 09:13:45
0
8
1159

如果服務(wù)器掛了或重啟了,緩存丟失了,有什么措施嗎?

數(shù)據(jù)已經(jīng)持久化了,

類似用redis實(shí)現(xiàn)關(guān)注功能, 如果緩存丟失,就會(huì)影響程序應(yīng)用邏輯

伊謝爾倫
伊謝爾倫

小伙看你根骨奇佳,潛力無(wú)限,來(lái)學(xué)PHP伐。

reply all(8)
Peter_Zhu

Mainly depends on whether you use redis as a cache or nosql. If it is a cache, it does not matter if you lose it. Just restore and rebuild from somewhere else. If it is nosql, redis has snapshot and aof mechanisms to ensure data persistence. of

Ty80

If it is a cache, then the application logic will not be affected if the cache is lost.

巴扎黑

Recover from aof file

伊謝爾倫

Since it is a cache, my understanding is that it doesn’t matter if it is lost.
If it is some user login data, sessionetc., then the user can only be asked to log in again.
If it is persisted, you can consider recovering from persistence

小葫蘆

It doesn’t matter if the cache is lost but the data has been persisted. In the worst case, you can just rebuild the cache. If it is redis, it can be restored from an aof file. As a cache, it can also be restored using an rdb file. The rdb restore should be faster.

小葫蘆

If it hangs, just restart it. The cache can be hanged. It’s just that the system is under greater pressure.

大家講道理

Since it has been persisted, there is nothing to worry about. The redis persistence should be an aof or rdb file. You can just restart and restore it. As for the specific earphone operation, there are detailed articles on the Internet for reference.

伊謝爾倫

Generally, programs with good design will automatically start the recache logic

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