2014-12-23 17:53
浏览 40

apcu和suPHP - 可能吗?

Is it possible to use apcu (as a php 5.5 module) in combination with suPHP?

The answer to What is best PHP Handler for APC says no:

suPHP also cannot work with an opcode caching extension such as eAccelerator or APC

but this post is over a year old and maybe not referring to apcu.

I can successfully enable the apcu module (in cPanel) and transfer content via apc_store and apc_fetch - but not between requests. It forgets what I've been storing when I reload the script/page.

So my first concern is to rule out if I'm trying something that's impossible anyway?

PS: for the record, What is userland caching APCu extension in PHP? gives some helpful background

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • dousi5358
    dousi5358 2014-12-23 17:55

    Not possible.

    suPHP runs each PHP request in a new process, so caching extensions that try to save data in memory across requests don't work. (Or, rather, they work, but any stored data is only accessible to that job, and is lost at the end of the request.)

    Use something like memcached if you need data caching.

    点赞 评论