Since PHP code is interpreted, every time we run a script, PHP has to parse the script and compile it to opcode (operation code) which represents the function of the code. Zend engine then executes that code.
This process can be really slow because every page load requires reading source files from disk and re-compiling them.
APC (Alternative PHP Cache) is open source PHP extension for caching and optimizing PHP intermediate code.
That means that PHP doesn’t have to parse and compile the code every time you hit the server with new request.
Operation code can be directly executed from the cache, which significantly reduces execution time.
Another advantage of APC is that provides a user cache for storing application data.
For big applications that consist of a large number of source files (e.g. Magento) using opcode caching software such as APC is very important for performance boost.
Recently I created a little Magento extension for clearing APC cache. The idea was to bring together Magento cache management and I just added a button to the Cache management section in Magento admin panel. That simplifies management of the APC cache.
I hope this will be useful 🙂