Configuring APC and Memcached

The cache system in Magento is based on cache parts of the HTML output and some configuration files. In this recipe, we will configure caching on the PHP level that you can do with APC and Memcached. APC will cache PHP files, while Memcached will cache objects.

Getting ready

When configuring APC and Memcached for our Magento store, we have to make sure that APC is installed on the server.

To install APC, follow these instructions:

  1. On a Debian-based Linux distribution, you can install APC with the following command:
    sudo apt-get install php-apc
  2. Follow the installer and APC will be available in your PHP configuration.
  3. To install Memcached, you can run the following command:
    sudo apt-get install php5-memcached
  4. To test if ...

Get Magento 1.8 Development Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.