Cache Object in PHP without using serialize

后端 未结 9 998
眼角桃花
眼角桃花 2020-12-14 12:26

I have a complex object that I create in a PHP script. I am looking for a way to store this object such that subsequent requests do not have to recreate it, or spend time un

9条回答
  •  隐瞒了意图╮
    2020-12-14 12:49

    if possible on your platform write a simple daemon that loads the your tree at startup then answers requests over a socket. Your server process can fork and answer queries without recreating the tree. Writing a daemon is not trivial, but very well documented (at least for C). You should have no trouble translating this to PHP using the pcntl and posix extensions.

提交回复
热议问题