do we need to restart apache + APC after new version deployment of app?

天涯浪子 提交于 2019-12-01 18:59:45
Vinko Vrsalovic

You can use apc_clear_cache().

See related questions:

How to clear APC cache entries?

How to clear APC cache without crashing Apache?

depends if you have the apc.stat setting in php.ini On or Off. If Off (typical for a production site) then you need to clear the code cache or restart apache; if On, then it should pick up the new code automatically

Normally, APC will 'stat' each PHP file to see if it has been changed since it was last cached. So restarting Apache is not required for all application upgrades.

BUT if your application uses apc_store() to store application data in the cache and some of that data might change after an upgrade, then restarting Apache is an easy way to flush the entire APC cache.

I believe apache2ctl graceful would work, too.

Also, APC performs a little better if you turn off the 'stat' checking; so if you disable that feature, then you'll want to restart Apache anyway.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!