php - Question about session storage in database or redis?
伊谢尔伦
伊谢尔伦 2017-06-05 11:07:54
0
1
633

I would like to ask, when the session is stored in the database or redis, does it store the sessionID or the sessionID and the corresponding value?

For example: $_SESSION['name'] = 'myName';
How to save it in the mysql database. What are the fields in the database table.

Also, does redis use string type to store sessions, or does it use list to store them.

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

reply all(1)
PHPzhong

Database fields are generally sessionid and session serialized values, which are the same whether stored in a database or in redis. There is a PHPSESSIONID or JSPSEESSIon in the frontend through cookies. Of course, you can prevent forgery, etc. anyway. If saved, both the value and key must be saved

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