I used the ioredis library for session persistence in the node project. I used the express-session middleware. Everyone knows that this middleware uses memorySotre by default. When I use this library, I modify the code in the background to save it. , the node service restarted, and the session was lost, so I later used redis. When I modified the code and restarted, the session was no longer lost. I did not modify any of the default configuration files of redis. I just saved a key. The question is why the save conditions are not met. Logically speaking, the session will not be synchronized to the disk and the session still exists in the memory. But why does the session data still exist when the service is restarted?