How can I tune the PHP realpath cache?

后端 未结 3 997
臣服心动
臣服心动 2020-12-30 16:19

Recent versions of PHP have a cache of filenames for knowing the real path of files, and require_once() and include_once() can take advantage of it

3条回答
  •  伪装坚强ぢ
    2020-12-30 17:08

    Though I can't offer anything specific to your situation, my understanding is that 16k is pretty low for most larger PHP applications (particularly ones that use a framework like the Zend Framework). I'd say at least double the cache size if your application uses lots of includes and see where to go from there. You might also want to increase the TTL as long as your directory structure is pretty consistent.

提交回复
热议问题