Using memcache as a session store?

前端 未结 7 2008
有刺的猬
有刺的猬 2020-12-29 11:22

I currently have a huge problem. Two days ago my site running on one server was too much, so I purchased two more and had them clustered (rsync and load balanced).

I

7条回答
  •  长情又很酷
    2020-12-29 11:48

    You can also write your sessions to a SQL DB. This will also give you persistent sessions across servers. See the tutorial below: http://culttt.com/2013/02/04/how-to-save-php-sessions-to-a-database/

    If you insist on running the sessions in memcached (in order to have better performance, but lower consistency) you can simply rewrite his code in a couple of places

提交回复
热议问题