Home  >  Article  >  Backend Development  >  How to reduce session saving pressure

How to reduce session saving pressure

WBOY
WBOYOriginal
2016-10-22 00:14:21855browse

Please ask the master to tell me the specific plan.

My idea is this, if you use cookies as a session, it is definitely unsafe and token verification must be added.

Reply content:

Please ask the master to tell me the specific plan.

My idea is this, if you use cookies as a session, it is definitely unsafe and token verification must be added.

PHP sessions are saved as files by default. You can instead access them in memcache or redis, which will be very efficient.

The following is how to modify the session saving mechanism
https://segmentfault.com/a/11...

Session is stored in the hard disk by default. Is there any storage pressure? Then those memory servers are dead, haha

Fall into DB,+https

Put the session into memcached and redis?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn